diff --git a/CHANGELOG.md b/CHANGELOG.md index cdeb74bc2..0ec6c461f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 application - Added possibility to update application pool +### Changed + +- SharePointDsc + - Updated build pipeline to use the correct vm image + ### Fixed +- SharePointDsc + - Fixed issue where the snapin was generating the "An item with the same + key has already been added" error - ReverseDsc - Fixed issue where the export would contain duplicate configuration - Fixed issue where the example export cmdlets was in the incorrect format @@ -23,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed issue where the resource was using hardcoded SP2016 and later paths and therefore didn't work in SP2013 - SPSearchServiceApp - - Fix SQL authentication support with updating DB ownership functions + - Disabled Farm account DB ownership updating functions when using SQL Auth - SPServiceAppPool - Fixed issue in Export method where the PsDscRunAsCredential was stored as a string instead of a PsCredential object diff --git a/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 index c47a00ba0..7c0be900b 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 b/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 index 1e25a32f1..ff44b82bb 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 b/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 index 137d79198..0fafe2f40 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 index a285be893..e23792dd5 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 b/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 index 2fdccff56..69436316b 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 b/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 index 23b6426c0..0704d12ff 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 index 94eb96f4d..1192f7712 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 index 1c0553cf4..85795e85b 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPAuthenticationRealm/MSFT_SPAuthenticationRealm.psm1 b/SharePointDsc/DSCResources/MSFT_SPAuthenticationRealm/MSFT_SPAuthenticationRealm.psm1 index b3bc5c8dc..69f4008fd 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAuthenticationRealm/MSFT_SPAuthenticationRealm.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAuthenticationRealm/MSFT_SPAuthenticationRealm.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPAzureAccessControlServiceAppProxy/MSFT_SPAzureAccessControlServiceAppProxy.psm1 b/SharePointDsc/DSCResources/MSFT_SPAzureAccessControlServiceAppProxy/MSFT_SPAzureAccessControlServiceAppProxy.psm1 index a70716426..53f702b0c 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAzureAccessControlServiceAppProxy/MSFT_SPAzureAccessControlServiceAppProxy.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAzureAccessControlServiceAppProxy/MSFT_SPAzureAccessControlServiceAppProxy.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 index 7f8ad7efe..8266f45d3 100644 --- a/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 index 10dca2903..3263f8bfa 100644 --- a/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 b/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 index 2604481e5..23081f9f0 100644 --- a/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 b/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 index 50764e1fa..c2f4d1fbf 100644 --- a/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 b/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 index 9b13cb8d3..4a0fa2e42 100644 --- a/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 b/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 index cb88744e3..79145fddf 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 index af8cac628..9b42d9e9e 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 index 709c79b4e..652f41899 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/MSFT_SPDiagnosticsProvider.psm1 b/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/MSFT_SPDiagnosticsProvider.psm1 index 8b30d14cf..ffcac5d87 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/MSFT_SPDiagnosticsProvider.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/MSFT_SPDiagnosticsProvider.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/MSFT_SPDistributedCacheClientSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/MSFT_SPDistributedCacheClientSettings.psm1 index 5529d5ce5..7461dd126 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/MSFT_SPDistributedCacheClientSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/MSFT_SPDistributedCacheClientSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 b/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 index 4a3614b92..c796aa08e 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPDocIcon/MSFT_SPDocIcon.psm1 b/SharePointDsc/DSCResources/MSFT_SPDocIcon/MSFT_SPDocIcon.psm1 index 8c8e12b82..5581b0d24 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDocIcon/MSFT_SPDocIcon.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDocIcon/MSFT_SPDocIcon.psm1 @@ -1,10 +1,7 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - $dociconPath = Join-Path -Path $env:CommonProgramFiles -ChildPath 'microsoft shared\Web Server Extensions\{0}\TEMPLATE\XML' $iconPath = Join-Path -Path $env:CommonProgramFiles -ChildPath 'microsoft shared\Web Server Extensions\{0}\TEMPLATE\IMAGES' + $dociconFileName = 'DOCICON.XML' -$backupFileName = 'DOCICON_Backup_{0}.XML' function Get-TargetResource { diff --git a/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 index e2a6745fd..6d5045d89 100644 --- a/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - $Script:TrustLocationProperties = @( "Address", "LocationType", diff --git a/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 b/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 index 850ccd2c9..6febf38d3 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - $script:resourceModulePath = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent $script:modulesFolderPath = Join-Path -Path $script:resourceModulePath -ChildPath 'Modules' diff --git a/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 b/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 index 6af8b8b04..030c6c8dd 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 b/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 index 3d891e2e4..064b4335f 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 b/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 index afa866f88..8658fef58 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 b/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 index fcec2e957..84419f6b3 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 b/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 index 20ee753d2..6586d6f30 100644 --- a/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPIncomingEmailSettings/MSFT_SPIncomingEmailSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPIncomingEmailSettings/MSFT_SPIncomingEmailSettings.psm1 index d67f32635..7da154121 100644 --- a/SharePointDsc/DSCResources/MSFT_SPIncomingEmailSettings/MSFT_SPIncomingEmailSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPIncomingEmailSettings/MSFT_SPIncomingEmailSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/MSFT_SPInfoPathFormsServiceConfig.psm1 b/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/MSFT_SPInfoPathFormsServiceConfig.psm1 index f39bda559..794b8065e 100644 --- a/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/MSFT_SPInfoPathFormsServiceConfig.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/MSFT_SPInfoPathFormsServiceConfig.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 b/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 index 828d67392..48a65a22a 100644 --- a/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 b/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 index a884033fd..482275928 100644 --- a/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 b/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 index 04809d55b..de70a7dbc 100644 --- a/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - $Script:SP2013Features = @("Application-Server", "AS-NET-Framework", "AS-TCP-Port-Sharing", "AS-Web-Support", "AS-WAS-Support", "AS-HTTP-Activation", "AS-Named-Pipes", "AS-TCP-Activation", "Web-Server", diff --git a/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 index a889b22c8..b278a6d92 100644 --- a/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPLogLevel/MSFT_SPLogLevel.psm1 b/SharePointDsc/DSCResources/MSFT_SPLogLevel/MSFT_SPLogLevel.psm1 index 18a229d82..15e82b781 100644 --- a/SharePointDsc/DSCResources/MSFT_SPLogLevel/MSFT_SPLogLevel.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPLogLevel/MSFT_SPLogLevel.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 index be8fa9ec5..116a9e8b6 100644 --- a/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 b/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 index 28d63fd97..4bd79b9df 100644 --- a/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 index 3d39f0ae1..7264021f2 100644 --- a/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/MSFT_SPManagedMetadataServiceAppDefault.psm1 b/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/MSFT_SPManagedMetadataServiceAppDefault.psm1 index 89fadc2ce..14c09eec2 100644 --- a/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/MSFT_SPManagedMetadataServiceAppDefault.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/MSFT_SPManagedMetadataServiceAppDefault.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 b/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 index f4085a7c4..b0baba989 100644 --- a/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/MSFT_SPMinRoleCompliance.psm1 b/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/MSFT_SPMinRoleCompliance.psm1 index a938569ed..e9b59a942 100644 --- a/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/MSFT_SPMinRoleCompliance.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/MSFT_SPMinRoleCompliance.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPOAppPrincipalMgmtServiceAppProxy/MSFT_SPOAppPrincipalMgmtServiceAppProxy.psm1 b/SharePointDsc/DSCResources/MSFT_SPOAppPrincipalMgmtServiceAppProxy/MSFT_SPOAppPrincipalMgmtServiceAppProxy.psm1 index d8da7140a..fb4e97fae 100644 --- a/SharePointDsc/DSCResources/MSFT_SPOAppPrincipalMgmtServiceAppProxy/MSFT_SPOAppPrincipalMgmtServiceAppProxy.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPOAppPrincipalMgmtServiceAppProxy/MSFT_SPOAppPrincipalMgmtServiceAppProxy.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 b/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 index cd53faba1..811b1449e 100644 --- a/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 index 054c04ac7..63ebe5521 100644 --- a/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 index 87311bfd4..f9fdebf13 100644 --- a/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 index 538db3041..e23af5754 100644 --- a/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 index 34f09bdd6..5c1004be2 100644 --- a/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 b/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 index e19a5c1c3..1269a3463 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/MSFT_SPProjectServerADResourcePoolSync.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/MSFT_SPProjectServerADResourcePoolSync.psm1 index 1e5f17f78..8151fcacd 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/MSFT_SPProjectServerADResourcePoolSync.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/MSFT_SPProjectServerADResourcePoolSync.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/MSFT_SPProjectServerAdditionalSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/MSFT_SPProjectServerAdditionalSettings.psm1 index a340f6d2d..d8e6c85d9 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/MSFT_SPProjectServerAdditionalSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/MSFT_SPProjectServerAdditionalSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/MSFT_SPProjectServerGlobalPermissions.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/MSFT_SPProjectServerGlobalPermissions.psm1 index 01e42a4c7..710f26cfe 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/MSFT_SPProjectServerGlobalPermissions.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/MSFT_SPProjectServerGlobalPermissions.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/MSFT_SPProjectServerGroup.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/MSFT_SPProjectServerGroup.psm1 index 7a51034f2..efa4ad9dc 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/MSFT_SPProjectServerGroup.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/MSFT_SPProjectServerGroup.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/MSFT_SPProjectServerLicense.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/MSFT_SPProjectServerLicense.psm1 index 9d9f54981..322f391be 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/MSFT_SPProjectServerLicense.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/MSFT_SPProjectServerLicense.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/MSFT_SPProjectServerPermissionMode.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/MSFT_SPProjectServerPermissionMode.psm1 index e47d08f08..ffd404b95 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/MSFT_SPProjectServerPermissionMode.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/MSFT_SPProjectServerPermissionMode.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/MSFT_SPProjectServerServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/MSFT_SPProjectServerServiceApp.psm1 index 9d6e1bc5f..7c86aa7ec 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/MSFT_SPProjectServerServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/MSFT_SPProjectServerServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/MSFT_SPProjectServerTimeSheetSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/MSFT_SPProjectServerTimeSheetSettings.psm1 index 020f90a87..41fa53cb4 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/MSFT_SPProjectServerTimeSheetSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/MSFT_SPProjectServerTimeSheetSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/MSFT_SPProjectServerUserSyncSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/MSFT_SPProjectServerUserSyncSettings.psm1 index c730846b8..9df4e658a 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/MSFT_SPProjectServerUserSyncSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/MSFT_SPProjectServerUserSyncSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/MSFT_SPProjectServerWssSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/MSFT_SPProjectServerWssSettings.psm1 index 6a5a5cb67..b18d2caf1 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/MSFT_SPProjectServerWssSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/MSFT_SPProjectServerWssSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 b/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 index 8fe6dde85..1d77757f5 100644 --- a/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 b/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 index a2b546f27..e8886a73d 100644 --- a/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 b/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 index ea76b0c57..0a93745cf 100644 --- a/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 index 9c0aa5f61..389e6d225 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 index 2ba534103..456ac6275 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 index e42c7577d..c70dae2af 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 index a5dfd2147..ee9231dc2 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 index 844d0c5e6..5b7310cfe 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 index b5b353574..fb2f16457 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 index a5d6bdac4..a99183613 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchManagedProperty/MSFT_SPSearchManagedProperty.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchManagedProperty/MSFT_SPSearchManagedProperty.psm1 index daed035a0..a65aa71c6 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchManagedProperty/MSFT_SPSearchManagedProperty.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchManagedProperty/MSFT_SPSearchManagedProperty.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchMetadataCategory/MSFT_SPSearchMetadataCategory.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchMetadataCategory/MSFT_SPSearchMetadataCategory.psm1 index b9fa8233f..eb9c4e12d 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchMetadataCategory/MSFT_SPSearchMetadataCategory.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchMetadataCategory/MSFT_SPSearchMetadataCategory.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 index 347620a43..3eb7b42a7 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 index cb1d901ed..6237a6d05 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { # Ignoring this because we need to generate a stub credential to return up the current @@ -148,69 +145,76 @@ function Get-TargetResource } } - Write-Verbose -Message "Checking Farm account permissions" - $farmAccountPermissionsNeedCorrecting = $false - - $farmAccount = (Get-SPFarm).DefaultServiceAccount.Name - $dbServer = $serviceApp.SearchAdminDatabase.NormalizedDataSource + if ($params.useSQLAuthentication -eq $true) + { + $farmAccountPermissionsNeedCorrecting = $false + } + else + { + Write-Verbose -Message "Checking Farm account permissions" + $farmAccountPermissionsNeedCorrecting = $false - Write-Verbose -Message "Checking Admin Database" - $adminDB = $serviceApp.SearchAdminDatabase.Name + $farmAccount = (Get-SPFarm).DefaultServiceAccount.Name + $dbServer = $serviceApp.SearchAdminDatabase.NormalizedDataSource - Write-Verbose -Message "Checking Admin Database: $adminDB" - $farmAccountPermissionsNeedCorrecting = (Confirm-UserIsDBOwner -SQLServer $dbServer ` - -Database $adminDB ` - -User $farmAccount ` - -DatabaseCredentials $params.DatabaseCredentials) -eq $false - Write-Verbose -Message "Farm Account Permissions Need Correcting: $farmAccountPermissionsNeedCorrecting" + Write-Verbose -Message "Checking Admin Database" + $adminDB = $serviceApp.SearchAdminDatabase.Name - Write-Verbose -Message "Checking Analytics reporting Database" - foreach ($database in $serviceApp.AnalyticsReportingDatabases) - { - $analyticsDB = $database.Name - - Write-Verbose -Message "Checking Analytics reporting Database: $analyticsDB" - if ($farmAccountPermissionsNeedCorrecting -eq $false) - { - $farmAccountPermissionsNeedCorrecting = (Confirm-UserIsDBOwner -SQLServer $dbServer ` - -Database $analyticsDB ` - -User $farmAccount ` - -DatabaseCredentials $params.DatabaseCredentials) -eq $false - } + Write-Verbose -Message "Checking Admin Database: $adminDB" + $farmAccountPermissionsNeedCorrecting = (Confirm-UserIsDBOwner -SQLServer $dbServer ` + -Database $adminDB ` + -User $farmAccount ` + -DatabaseCredentials $params.DatabaseCredentials) -eq $false Write-Verbose -Message "Farm Account Permissions Need Correcting: $farmAccountPermissionsNeedCorrecting" - } - Write-Verbose -Message "Checking Crawl Database(s)" - if ($farmAccountPermissionsNeedCorrecting -eq $false) - { - foreach ($database in (Get-SPEnterpriseSearchCrawlDatabase -SearchApplication $serviceApp)) + Write-Verbose -Message "Checking Analytics reporting Database" + foreach ($database in $serviceApp.AnalyticsReportingDatabases) { - $crawlDB = $database.Database.Name - $dbServer = $database.Database.NormalizedDataSource - - Write-Verbose -Message "Checking Crawl Database: $crawlDB" - $farmAccountPermissionsNeedCorrecting = (Confirm-UserIsDBOwner -SQLServer $dbServer ` - -Database $crawlDB ` - -User $farmAccount ` - -DatabaseCredentials $params.DatabaseCredentials) -eq $false + $analyticsDB = $database.Name + + Write-Verbose -Message "Checking Analytics reporting Database: $analyticsDB" + if ($farmAccountPermissionsNeedCorrecting -eq $false) + { + $farmAccountPermissionsNeedCorrecting = (Confirm-UserIsDBOwner -SQLServer $dbServer ` + -Database $analyticsDB ` + -User $farmAccount ` + -DatabaseCredentials $params.DatabaseCredentials) -eq $false + } Write-Verbose -Message "Farm Account Permissions Need Correcting: $farmAccountPermissionsNeedCorrecting" } - } - Write-Verbose -Message "Checking Links Database(s)" - if ($farmAccountPermissionsNeedCorrecting -eq $false) - { - foreach ($database in (Get-SPEnterpriseSearchLinksDatabase -SearchApplication $serviceApp)) + Write-Verbose -Message "Checking Crawl Database(s)" + if ($farmAccountPermissionsNeedCorrecting -eq $false) { - $linksDB = $database.Database.Name - $dbServer = $database.Database.NormalizedDataSource + foreach ($database in (Get-SPEnterpriseSearchCrawlDatabase -SearchApplication $serviceApp)) + { + $crawlDB = $database.Database.Name + $dbServer = $database.Database.NormalizedDataSource + + Write-Verbose -Message "Checking Crawl Database: $crawlDB" + $farmAccountPermissionsNeedCorrecting = (Confirm-UserIsDBOwner -SQLServer $dbServer ` + -Database $crawlDB ` + -User $farmAccount ` + -DatabaseCredentials $params.DatabaseCredentials) -eq $false + Write-Verbose -Message "Farm Account Permissions Need Correcting: $farmAccountPermissionsNeedCorrecting" + } + } - Write-Verbose -Message "Checking Links Database: $linksDB" - $farmAccountPermissionsNeedCorrecting = (Confirm-UserIsDBOwner -SQLServer $dbServer ` - -Database $linksDB ` - -User $farmAccount ` - -DatabaseCredentials $params.DatabaseCredentials) -eq $false - Write-Verbose -Message "Farm Account Permissions Need Correcting: $farmAccountPermissionsNeedCorrecting" + Write-Verbose -Message "Checking Links Database(s)" + if ($farmAccountPermissionsNeedCorrecting -eq $false) + { + foreach ($database in (Get-SPEnterpriseSearchLinksDatabase -SearchApplication $serviceApp)) + { + $linksDB = $database.Database.Name + $dbServer = $database.Database.NormalizedDataSource + + Write-Verbose -Message "Checking Links Database: $linksDB" + $farmAccountPermissionsNeedCorrecting = (Confirm-UserIsDBOwner -SQLServer $dbServer ` + -Database $linksDB ` + -User $farmAccount ` + -DatabaseCredentials $params.DatabaseCredentials) -eq $false + Write-Verbose -Message "Farm Account Permissions Need Correcting: $farmAccountPermissionsNeedCorrecting" + } } } @@ -298,7 +302,17 @@ function Set-TargetResource Write-Verbose -Message "Setting Search service application '$Name'" - $PSBoundParameters.FixFarmAccountPermissions = $FixFarmAccountPermissions + if ($UseSQLAuthentication -eq $true) + { + Write-Verbose ("Cannot check Farm Account permissions when SQL " + ` + "DatabaseCredentials are specified.") + Write-Verbose "Setting FixFarmAccountPermissions to False" + $PSBoundParameters.FixFarmAccountPermissions = $false + } + else + { + $PSBoundParameters.FixFarmAccountPermissions = $FixFarmAccountPermissions + } $result = Get-TargetResource @PSBoundParameters diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchServiceSettings/MSFT_SPSearchServiceSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchServiceSettings/MSFT_SPSearchServiceSettings.psm1 index 59d501caf..55423ed90 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchServiceSettings/MSFT_SPSearchServiceSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchServiceSettings/MSFT_SPSearchServiceSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { # Ignoring this because we need to generate a stub credential to return up the current diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 index d2029eb63..133645939 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 index 175215583..c6f77500c 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/MSFT_SPSecurityTokenServiceConfig.psm1 b/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/MSFT_SPSecurityTokenServiceConfig.psm1 index 7c77f2b2f..5eb784718 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/MSFT_SPSecurityTokenServiceConfig.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/MSFT_SPSecurityTokenServiceConfig.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSelfServiceSiteCreation/MSFT_SPSelfServiceSiteCreation.psm1 b/SharePointDsc/DSCResources/MSFT_SPSelfServiceSiteCreation/MSFT_SPSelfServiceSiteCreation.psm1 index 80278ee86..23a59ae73 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSelfServiceSiteCreation/MSFT_SPSelfServiceSiteCreation.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSelfServiceSiteCreation/MSFT_SPSelfServiceSiteCreation.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPService/MSFT_SPService.psm1 b/SharePointDsc/DSCResources/MSFT_SPService/MSFT_SPService.psm1 index c64fa829f..b548e860d 100644 --- a/SharePointDsc/DSCResources/MSFT_SPService/MSFT_SPService.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPService/MSFT_SPService.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 b/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 index f4a52d715..8ded46aef 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 b/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 index 631610c75..c766dc153 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 b/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 index be759459d..d6fd7366d 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/MSFT_SPServiceIdentity.psm1 b/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/MSFT_SPServiceIdentity.psm1 index 7ab560e44..e89e49039 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/MSFT_SPServiceIdentity.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/MSFT_SPServiceIdentity.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 b/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 index 89d809230..a670975a4 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 b/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 index 39c1c39ba..0a4274530 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 b/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 index 178046a78..585a72b79 100644 --- a/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 b/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 index 342b2e70a..9119f4812 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSitePropertyBag/MSFT_SPSitePropertyBag.psm1 b/SharePointDsc/DSCResources/MSFT_SPSitePropertyBag/MSFT_SPSitePropertyBag.psm1 index 5cf26f459..d43666af6 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSitePropertyBag/MSFT_SPSitePropertyBag.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSitePropertyBag/MSFT_SPSitePropertyBag.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSiteUrl/MSFT_SPSiteUrl.psm1 b/SharePointDsc/DSCResources/MSFT_SPSiteUrl/MSFT_SPSiteUrl.psm1 index af4c233d1..6d3fa3390 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSiteUrl/MSFT_SPSiteUrl.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSiteUrl/MSFT_SPSiteUrl.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 index 53968d368..898446b95 100644 --- a/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 index 9b7301b5d..28cbb27a6 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 b/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 index 10101eb54..b23917c98 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 b/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 index 7a7098b44..ffbc3a8cf 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 b/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 index c84b48c38..8bc0f08b5 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 b/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 index 00c7c9abf..c9d0c7cf1 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPTrustedSecurityTokenIssuer/MSFT_SPTrustedSecurityTokenIssuer.psm1 b/SharePointDsc/DSCResources/MSFT_SPTrustedSecurityTokenIssuer/MSFT_SPTrustedSecurityTokenIssuer.psm1 index 92f9250b5..4d78062ff 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTrustedSecurityTokenIssuer/MSFT_SPTrustedSecurityTokenIssuer.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTrustedSecurityTokenIssuer/MSFT_SPTrustedSecurityTokenIssuer.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 b/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 index 9a625574d..73b962569 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPUsageDefinition/MSFT_SPUsageDefinition.psm1 b/SharePointDsc/DSCResources/MSFT_SPUsageDefinition/MSFT_SPUsageDefinition.psm1 index 8ac845275..6f07038f1 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUsageDefinition/MSFT_SPUsageDefinition.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUsageDefinition/MSFT_SPUsageDefinition.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 b/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 index 38698f21d..f9c5def78 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 b/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 index 12af205ad..7ae126df1 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 index a3ab4cb5e..b2e35af85 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 b/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 index d6fed5da2..05ee3d3de 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 b/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 index 58ae4a547..1ceb65d5c 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 b/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 index e29b495ba..f78564806 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 index cda93444b..2931c17e6 100644 --- a/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 b/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 index 9bc140f2a..cf7929faa 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/MSFT_SPWebAppAuthentication.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/MSFT_SPWebAppAuthentication.psm1 index 76784bbe7..ec7a73378 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/MSFT_SPWebAppAuthentication.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/MSFT_SPWebAppAuthentication.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 index 8a4ffa972..c95548616 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppClientCallableSettings/MSFT_SPWebAppClientCallableSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppClientCallableSettings/MSFT_SPWebAppClientCallableSettings.psm1 index d3d654857..5727132ea 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppClientCallableSettings/MSFT_SPWebAppClientCallableSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppClientCallableSettings/MSFT_SPWebAppClientCallableSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 index 947d6a015..0aaee8a65 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppHttpThrottlingMonitor/MSFT_SPWebAppHttpThrottlingMonitor.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppHttpThrottlingMonitor/MSFT_SPWebAppHttpThrottlingMonitor.psm1 index 9aaf048ea..454b0173e 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppHttpThrottlingMonitor/MSFT_SPWebAppHttpThrottlingMonitor.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppHttpThrottlingMonitor/MSFT_SPWebAppHttpThrottlingMonitor.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/MSFT_SPWebAppPeoplePickerSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/MSFT_SPWebAppPeoplePickerSettings.psm1 index fe13837e7..e62ef6d41 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/MSFT_SPWebAppPeoplePickerSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/MSFT_SPWebAppPeoplePickerSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 index c4ba92e60..e172be475 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 index 5839d16e8..0ea2a6251 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppPropertyBag/MSFT_SPWebAppPropertyBag.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppPropertyBag/MSFT_SPWebAppPropertyBag.psm1 index e6b75b7c4..ecc158a5c 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppPropertyBag/MSFT_SPWebAppPropertyBag.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppPropertyBag/MSFT_SPWebAppPropertyBag.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 index 6d8582c0b..734837a63 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 index 190e694cc..2f1c40b8c 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/MSFT_SPWebAppSuiteBar.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/MSFT_SPWebAppSuiteBar.psm1 index 5a7098302..5a13a0e23 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/MSFT_SPWebAppSuiteBar.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/MSFT_SPWebAppSuiteBar.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 index 668311415..7dd5619ad 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 index b40330651..8d438ba41 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 index afe11c85e..cb3019e15 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 index 1044e5e75..c450a5b50 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 index b49a056ad..e399e650b 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 index 3ea7a7796..ef19560a8 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 index 2dd053c28..a8e73f539 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/DSCResources/MSFT_SPWorkflowService/MSFT_SPWorkflowService.psm1 b/SharePointDsc/DSCResources/MSFT_SPWorkflowService/MSFT_SPWorkflowService.psm1 index ffcb82dad..d81c707e5 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWorkflowService/MSFT_SPWorkflowService.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWorkflowService/MSFT_SPWorkflowService.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-TargetResource { [CmdletBinding()] diff --git a/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 b/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 index 2f9fd5fb6..3a81f0532 100644 --- a/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Mount-SPDscContentDatabase() { param diff --git a/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 b/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 index 1753fd949..c91ddd425 100644 --- a/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - <# .SYNOPSIS diff --git a/SharePointDsc/Modules/SharePointDsc.ProjectServerConnector/SharePointDsc.ProjectServerConnector.psm1 b/SharePointDsc/Modules/SharePointDsc.ProjectServerConnector/SharePointDsc.ProjectServerConnector.psm1 index 4db20307f..9fc3592c5 100644 --- a/SharePointDsc/Modules/SharePointDsc.ProjectServerConnector/SharePointDsc.ProjectServerConnector.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.ProjectServerConnector/SharePointDsc.ProjectServerConnector.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-SPDscProjectServerGlobalPermissionId { param diff --git a/SharePointDsc/Modules/SharePointDsc.Reverse/Import-SPPowerShellSnapIn.ps1 b/SharePointDsc/Modules/SharePointDsc.Reverse/Import-SPPowerShellSnapIn.ps1 index 7efc84de0..0ced7da18 100644 --- a/SharePointDsc/Modules/SharePointDsc.Reverse/Import-SPPowerShellSnapIn.ps1 +++ b/SharePointDsc/Modules/SharePointDsc.Reverse/Import-SPPowerShellSnapIn.ps1 @@ -1,4 +1,9 @@ -if (-not (Get-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue)) +$stack = Get-PSCallStack + +if ($stack[1].Position.Text -eq 'Export-SPConfiguration') { - Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue + if (-not (Get-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue)) + { + Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue + } } diff --git a/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 b/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 index 202a171a1..b4049ced6 100644 --- a/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-SPDscSearchCrawlSchedule { [CmdletBinding()] diff --git a/SharePointDsc/Modules/SharePointDsc.Search/SPSearchServiceApp.psm1 b/SharePointDsc/Modules/SharePointDsc.Search/SPSearchServiceApp.psm1 index 2455a0c68..29bce7491 100644 --- a/SharePointDsc/Modules/SharePointDsc.Search/SPSearchServiceApp.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.Search/SPSearchServiceApp.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Confirm-UserIsDBOwner { param @@ -32,10 +29,12 @@ function Confirm-UserIsDBOwner $marshal = [Runtime.InteropServices.Marshal] $dbCredentialsPlainPassword = $marshal::PtrToStringAuto($marshal::SecureStringToBSTR($DatabaseCredentials.Password)) $connection.ConnectionString = "Server=$SQLServer;Integrated Security=False;User ID=$($DatabaseCredentials.Username);Password=$dbCredentialsPlainPassword;Database=master" + $checkUser = $DatabaseCredentials.UserName } else # Just use Windows integrated auth { $connection.ConnectionString = "Server=$SQLServer;Integrated Security=SSPI;Database=master" + $checkUser = $User } try @@ -44,7 +43,7 @@ function Confirm-UserIsDBOwner $command.Connection = $connection $command.CommandText = @" -USE [$Database] +USE [{0}] SELECT DP1.name AS DatabaseRoleName, isnull (DP2.name, 'No members') AS DatabaseUserName @@ -53,8 +52,8 @@ SELECT DP1.name AS DatabaseRoleName, ON DRM.role_principal_id = DP1.principal_id LEFT OUTER JOIN sys.database_principals AS DP2 ON DRM.member_principal_id = DP2.principal_id -WHERE DP1.type = 'R' AND DP2.name = '$User' AND DP1.name = 'db_owner' -"@ +WHERE DP1.type = 'R' AND DP2.name = '{1}' AND DP1.name = 'db_owner' +"@ -f $Database, $checkUser $result = ($command.ExecuteScalar() -eq "db_owner") } @@ -100,9 +99,11 @@ function Set-UserAsDBOwner $command = New-Object -TypeName "System.Data.SqlClient.SqlCommand" # If we specified SQL credentials then try to use them + $sqlauth = $false if ($PSBoundParameters.ContainsKey("DatabaseCredentials") -and ` - [System.String]::IsNullOrEmpty($DatabaseCredentials) -eq $false) + [System.String]::IsNullOrEmpty($DatabaseCredentials) -eq $false) { + $sqlauth = $true $marshal = [Runtime.InteropServices.Marshal] $dbCredentialsPlainPassword = $marshal::PtrToStringAuto($marshal::SecureStringToBSTR($DatabaseCredentials.Password)) $connection.ConnectionString = "Server=$SQLServer;Integrated Security=False;User ID=$($DatabaseCredentials.Username);Password=$dbCredentialsPlainPassword;Database=master" @@ -117,19 +118,19 @@ function Set-UserAsDBOwner $connection.Open() $command.Connection = $connection - $command.CommandText = @" -USE [$Database] + $sql = @" +USE [{0}] DECLARE @NewUserName sysname; -SET @NewUserName = '$User'; +SET @NewUserName = '{1}'; /* Users are typically mapped to logins, as OP's question implies, so make sure an appropriate login exists. */ IF NOT EXISTS(SELECT principal_id FROM sys.server_principals WHERE name = @NewUserName) BEGIN /* Syntax for SQL server login. See BOL for domain logins, etc. */ DECLARE @LoginSQL as varchar(500); - SET @LoginSQL = 'CREATE LOGIN ['+ @NewUserName + '] FROM WINDOWS'; + SET @LoginSQL = 'CREATE LOGIN ['+ @NewUserName + '] {2}'; EXEC (@LoginSQL); END @@ -155,6 +156,21 @@ BEGIN EXEC (@roleSQL); END "@ + + if ($sqlauth -eq $true) + { + # Using SQL Auth + $options = "WITH PASSWORD = ''{0}'', CHECK_POLICY=OFF, CHECK_EXPIRATION=OFF" -f $DatabaseCredentials.GetNetworkCredential().Password + $checkUser = $DatabaseCredentials.UserName + } + else + { + # Using Windows Integrated Auth + $options = "FROM WINDOWS" + $checkUser = $User + } + + $command.CommandText = $sql -f $Database, $checkUser, $options $null = $command.ExecuteNonQuery() } catch diff --git a/SharePointDsc/Modules/SharePointDsc.ServiceAppSecurity/SPServiceAppSecurity.psm1 b/SharePointDsc/Modules/SharePointDsc.ServiceAppSecurity/SPServiceAppSecurity.psm1 index c8f2b80a8..3221d8115 100644 --- a/SharePointDsc/Modules/SharePointDsc.ServiceAppSecurity/SPServiceAppSecurity.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.ServiceAppSecurity/SPServiceAppSecurity.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Expand-AccessLevel { [OutputType([System.String[]])] diff --git a/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 b/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 index 952520de5..e3e9bdcc1 100644 --- a/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 @@ -1555,10 +1555,6 @@ function Export-SPConfiguration [switch] $Standalone, - [Parameter()] - [Boolean] - $Confirm = $true, - [Parameter()] [String] $OutputFile = $null, diff --git a/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 b/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 index 453db22d8..3e073d200 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Assert-SPDscPolicyUser() { param diff --git a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 index 3b81e217a..63dbe5a88 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-SPDscWebApplicationBlockedFileTypeConfig { [CmdletBinding()] diff --git a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 index d75050f22..8af3083bb 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-SPDscWebApplicationGeneralConfig { [CmdletBinding()] diff --git a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 index 9a4adfab6..7e5603b7a 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-SPDscWebApplicationThrottlingConfig { [CmdletBinding()] diff --git a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 index 0804cdcb3..9ed33a2ff 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 @@ -1,6 +1,3 @@ -$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' -Import-Module -Name $script:SPDscUtilModulePath - function Get-SPDscWebApplicationWorkflowConfig { [CmdletBinding()] diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5bcbdd563..1e1cdf692 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,7 +22,7 @@ stages: - job: Package_Module displayName: 'Package Module' pool: - vmImage: 'ubuntu 16.04' + vmImage: 'ubuntu-18.04' steps: - task: GitVersion@5 name: gitVersion @@ -202,7 +202,7 @@ stages: - 'Test_Unit_2016' - 'Test_Unit_2019' pool: - vmImage: 'ubuntu 16.04' + vmImage: 'ubuntu-18.04' timeoutInMinutes: 0 steps: - pwsh: | @@ -276,7 +276,7 @@ stages: - job: Deploy_Module displayName: 'Deploy Module' pool: - vmImage: 'ubuntu 16.04' + vmImage: 'ubuntu-18.04' steps: - task: DownloadPipelineArtifact@2 displayName: 'Download Pipeline Artifact'