diff --git a/CHANGELOG.md b/CHANGELOG.md index b60c8135f..48b1bc385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- SharePointDsc + - Fixed regression in v4.5 + ## [4.5.0] - 2021-01-30 ### Added diff --git a/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 index 1c9d31d6c..d24dded67 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAccessServiceApp/MSFT_SPAccessServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 936a100fa..a8b92a458 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAccessServices2010/MSFT_SPAccessServices2010.psm1 @@ -1,3 +1,6 @@ +$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 0fafe2f40..137d79198 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAlternateUrl/MSFT_SPAlternateUrl.psm1 @@ -1,3 +1,6 @@ +$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 e23792dd5..a285be893 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAntivirusSettings/MSFT_SPAntivirusSettings.psm1 @@ -1,3 +1,6 @@ +$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 69436316b..2fdccff56 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAppCatalog/MSFT_SPAppCatalog.psm1 @@ -1,3 +1,6 @@ +$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 04ed56e3e..62d0d8375 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAppDomain/MSFT_SPAppDomain.psm1 @@ -1,3 +1,6 @@ +$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 f614f7df6..2467f76b8 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAppManagementServiceApp/MSFT_SPAppManagementServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 85795e85b..1c0553cf4 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAppStoreSettings/MSFT_SPAppStoreSettings.psm1 @@ -1,3 +1,6 @@ +$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 52cdabd7f..b3bc5c8dc 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAuthenticationRealm/MSFT_SPAuthenticationRealm.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAuthenticationRealm/MSFT_SPAuthenticationRealm.psm1 @@ -1,4 +1,7 @@ -function Get-TargetResource() +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + +function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.HashTable])] diff --git a/SharePointDsc/DSCResources/MSFT_SPAzureAccessControlServiceAppProxy/MSFT_SPAzureAccessControlServiceAppProxy.psm1 b/SharePointDsc/DSCResources/MSFT_SPAzureAccessControlServiceAppProxy/MSFT_SPAzureAccessControlServiceAppProxy.psm1 index 53f702b0c..a70716426 100644 --- a/SharePointDsc/DSCResources/MSFT_SPAzureAccessControlServiceAppProxy/MSFT_SPAzureAccessControlServiceAppProxy.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPAzureAccessControlServiceAppProxy/MSFT_SPAzureAccessControlServiceAppProxy.psm1 @@ -1,3 +1,6 @@ +$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 af2b51e32..30630c328 100644 --- a/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPBCSServiceApp/MSFT_SPBCSServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 3263f8bfa..10dca2903 100644 --- a/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPBlobCacheSettings/MSFT_SPBlobCacheSettings.psm1 @@ -1,3 +1,6 @@ +$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 23081f9f0..2604481e5 100644 --- a/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPCacheAccounts/MSFT_SPCacheAccounts.psm1 @@ -1,3 +1,6 @@ +$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 9dbc1b3a4..afc1d3057 100644 --- a/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPConfigWizard/MSFT_SPConfigWizard.psm1 @@ -1,3 +1,6 @@ +$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 ea08d98af..2f7370015 100644 --- a/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPContentDatabase/MSFT_SPContentDatabase.psm1 @@ -1,3 +1,6 @@ +$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 79145fddf..cb88744e3 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDatabaseAAG/MSFT_SPDatabaseAAG.psm1 @@ -1,3 +1,6 @@ +$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 9b42d9e9e..af8cac628 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDesignerSettings/MSFT_SPDesignerSettings.psm1 @@ -1,3 +1,6 @@ +$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 652f41899..709c79b4e 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDiagnosticLoggingSettings/MSFT_SPDiagnosticLoggingSettings.psm1 @@ -1,3 +1,6 @@ +$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 ffcac5d87..8b30d14cf 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/MSFT_SPDiagnosticsProvider.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDiagnosticsProvider/MSFT_SPDiagnosticsProvider.psm1 @@ -1,3 +1,6 @@ +$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 7461dd126..5529d5ce5 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/MSFT_SPDistributedCacheClientSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDistributedCacheClientSettings/MSFT_SPDistributedCacheClientSettings.psm1 @@ -1,3 +1,6 @@ +$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 c796aa08e..4a3614b92 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDistributedCacheService/MSFT_SPDistributedCacheService.psm1 @@ -1,3 +1,6 @@ +$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 59082dd7c..7599f2b60 100644 --- a/SharePointDsc/DSCResources/MSFT_SPDocIcon/MSFT_SPDocIcon.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPDocIcon/MSFT_SPDocIcon.psm1 @@ -1,3 +1,6 @@ +$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\16\TEMPLATE\XML' $iconPath = Join-Path -Path $env:CommonProgramFiles -ChildPath 'microsoft shared\Web Server Extensions\16\TEMPLATE\IMAGES' $dociconFileName = 'DOCICON.XML' diff --git a/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 b/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 index b1f549e5c..1ec1d2697 100644 --- a/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPExcelServiceApp/MSFT_SPExcelServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 ba7331f98..5ed779996 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFarm/MSFT_SPFarm.psm1 @@ -1,3 +1,6 @@ +$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 32ce5f071..a3d100a29 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFarmAdministrators/MSFT_SPFarmAdministrators.psm1 @@ -1,3 +1,6 @@ +$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 0089f8c9a..3d891e2e4 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFarmPropertyBag/MSFT_SPFarmPropertyBag.psm1 @@ -1,4 +1,7 @@ -function Get-TargetResource() +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + +function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.HashTable])] diff --git a/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 b/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 index 8658fef58..afa866f88 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFarmSolution/MSFT_SPFarmSolution.psm1 @@ -1,3 +1,6 @@ +$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 84419f6b3..fcec2e957 100644 --- a/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPFeature/MSFT_SPFeature.psm1 @@ -1,3 +1,6 @@ +$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 6586d6f30..20ee753d2 100644 --- a/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPHealthAnalyzerRuleState/MSFT_SPHealthAnalyzerRuleState.psm1 @@ -1,3 +1,6 @@ +$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 7da154121..d67f32635 100644 --- a/SharePointDsc/DSCResources/MSFT_SPIncomingEmailSettings/MSFT_SPIncomingEmailSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPIncomingEmailSettings/MSFT_SPIncomingEmailSettings.psm1 @@ -1,3 +1,6 @@ +$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 794b8065e..f39bda559 100644 --- a/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/MSFT_SPInfoPathFormsServiceConfig.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPInfoPathFormsServiceConfig/MSFT_SPInfoPathFormsServiceConfig.psm1 @@ -1,3 +1,6 @@ +$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 48a65a22a..828d67392 100644 --- a/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPInstall/MSFT_SPInstall.psm1 @@ -1,3 +1,6 @@ +$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 a4f70c882..7f121a668 100644 --- a/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPInstallLanguagePack/MSFT_SPInstallLanguagePack.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -124,7 +127,8 @@ function Get-TargetResource switch -Regex ($parsedProduct) { "Dari" - { $languageEN = "Dari" + { + $languageEN = "Dari" } "Serbian" { diff --git a/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 b/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 index de70a7dbc..04809d55b 100644 --- a/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPInstallPrereqs/MSFT_SPInstallPrereqs.psm1 @@ -1,3 +1,6 @@ +$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 b278a6d92..a889b22c8 100644 --- a/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.psm1 @@ -1,3 +1,6 @@ +$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 028c489d1..d5b34d7f5 100644 --- a/SharePointDsc/DSCResources/MSFT_SPLogLevel/MSFT_SPLogLevel.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPLogLevel/MSFT_SPLogLevel.psm1 @@ -1,3 +1,6 @@ +$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 65e25a6a3..d43692a70 100644 --- a/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPMachineTranslationServiceApp/MSFT_SPMachineTranslationServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 4bd79b9df..28d63fd97 100644 --- a/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPManagedAccount/MSFT_SPManagedAccount.psm1 @@ -1,3 +1,6 @@ +$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 e43d2b2b9..dd5571a57 100644 --- a/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceApp/MSFT_SPManagedMetaDataServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 14c09eec2..89fadc2ce 100644 --- a/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/MSFT_SPManagedMetadataServiceAppDefault.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPManagedMetadataServiceAppDefault/MSFT_SPManagedMetadataServiceAppDefault.psm1 @@ -1,3 +1,6 @@ +$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 b0baba989..f4085a7c4 100644 --- a/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPManagedPath/MSFT_SPManagedPath.psm1 @@ -1,3 +1,6 @@ +$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 e9b59a942..a938569ed 100644 --- a/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/MSFT_SPMinRoleCompliance.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPMinRoleCompliance/MSFT_SPMinRoleCompliance.psm1 @@ -1,3 +1,6 @@ +$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 fb4e97fae..d8da7140a 100644 --- a/SharePointDsc/DSCResources/MSFT_SPOAppPrincipalMgmtServiceAppProxy/MSFT_SPOAppPrincipalMgmtServiceAppProxy.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPOAppPrincipalMgmtServiceAppProxy/MSFT_SPOAppPrincipalMgmtServiceAppProxy.psm1 @@ -1,3 +1,6 @@ +$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 811b1449e..cd53faba1 100644 --- a/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPOfficeOnlineServerBinding/MSFT_SPOfficeOnlineServerBinding.psm1 @@ -1,3 +1,6 @@ +$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 63ebe5521..054c04ac7 100644 --- a/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPOutgoingEmailSettings/MSFT_SPOutgoingEmailSettings.psm1 @@ -1,3 +1,6 @@ +$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 f9fdebf13..87311bfd4 100644 --- a/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPPasswordChangeSettings/MSFT_SPPasswordChangeSettings.psm1 @@ -1,3 +1,6 @@ +$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 9b5d6573d..b1a293d49 100644 --- a/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPPerformancePointServiceApp/MSFT_SPPerformancePointServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 39ec73679..f65af6ccf 100644 --- a/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPPowerPointAutomationServiceApp/MSFT_SPPowerPointAutomationServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 1269a3463..e19a5c1c3 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProductUpdate/MSFT_SPProductUpdate.psm1 @@ -1,3 +1,6 @@ +$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 8151fcacd..1e5f17f78 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/MSFT_SPProjectServerADResourcePoolSync.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerADResourcePoolSync/MSFT_SPProjectServerADResourcePoolSync.psm1 @@ -1,3 +1,6 @@ +$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 d8e6c85d9..a340f6d2d 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/MSFT_SPProjectServerAdditionalSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerAdditionalSettings/MSFT_SPProjectServerAdditionalSettings.psm1 @@ -1,3 +1,6 @@ +$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 710f26cfe..01e42a4c7 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/MSFT_SPProjectServerGlobalPermissions.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerGlobalPermissions/MSFT_SPProjectServerGlobalPermissions.psm1 @@ -1,3 +1,6 @@ +$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 efa4ad9dc..7a51034f2 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/MSFT_SPProjectServerGroup.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerGroup/MSFT_SPProjectServerGroup.psm1 @@ -1,3 +1,6 @@ +$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 322f391be..9d9f54981 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/MSFT_SPProjectServerLicense.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerLicense/MSFT_SPProjectServerLicense.psm1 @@ -1,3 +1,6 @@ +$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 ffd404b95..e47d08f08 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/MSFT_SPProjectServerPermissionMode.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerPermissionMode/MSFT_SPProjectServerPermissionMode.psm1 @@ -1,3 +1,6 @@ +$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 d60945c48..52ae98bf7 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/MSFT_SPProjectServerServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerServiceApp/MSFT_SPProjectServerServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 41fa53cb4..020f90a87 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/MSFT_SPProjectServerTimeSheetSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerTimeSheetSettings/MSFT_SPProjectServerTimeSheetSettings.psm1 @@ -1,3 +1,6 @@ +$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 9df4e658a..c730846b8 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/MSFT_SPProjectServerUserSyncSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerUserSyncSettings/MSFT_SPProjectServerUserSyncSettings.psm1 @@ -1,3 +1,6 @@ +$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 b18d2caf1..6a5a5cb67 100644 --- a/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/MSFT_SPProjectServerWssSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPProjectServerWssSettings/MSFT_SPProjectServerWssSettings.psm1 @@ -1,3 +1,6 @@ +$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 56fbf989a..fac874d4c 100644 --- a/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPPublishServiceApplication/MSFT_SPPublishServiceApplication.psm1 @@ -1,3 +1,6 @@ +$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 e8886a73d..a2b546f27 100644 --- a/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPQuotaTemplate/MSFT_SPQuotaTemplate.psm1 @@ -1,3 +1,6 @@ +$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 afc6a7962..ea76b0c57 100644 --- a/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPRemoteFarmTrust/MSFT_SPRemoteFarmTrust.psm1 @@ -1,4 +1,7 @@ -function Get-TargetResource() +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + +function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.HashTable])] diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 index 081290d91..9c0aa5f61 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchAuthoritativePage/MSFT_SPSearchAuthoritativePage.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -329,4 +332,3 @@ function Test-TargetResource } Export-ModuleMember -Function *-TargetResource - diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 index 456ac6275..2ba534103 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchContentSource/MSFT_SPSearchContentSource.psm1 @@ -1,3 +1,6 @@ +$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 81350d4c0..e42c7577d 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlMapping/MSFT_SPSearchCrawlMapping.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -235,4 +238,3 @@ function Test-TargetResource } Export-ModuleMember -Function *-TargetResource - diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 index 9c1d79f96..5b1654e8d 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlRule/MSFT_SPSearchCrawlRule.psm1 @@ -1,3 +1,6 @@ +$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 1a5618a53..844d0c5e6 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchCrawlerImpactRule/MSFT_SPSearchCrawlerImpactRule.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -337,4 +340,3 @@ function Test-TargetResource } Export-ModuleMember -Function *-TargetResource - diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 index 0d7fe09c6..9d48d6b8a 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchFileType/MSFT_SPSearchFileType.psm1 @@ -1,3 +1,6 @@ +$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 a99183613..a5d6bdac4 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchIndexPartition/MSFT_SPSearchIndexPartition.psm1 @@ -1,3 +1,6 @@ +$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 f0373edf6..5fb18d3fa 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchManagedProperty/MSFT_SPSearchManagedProperty.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchManagedProperty/MSFT_SPSearchManagedProperty.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -95,7 +98,7 @@ function Get-TargetResource throw $message } $managedProperty = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa | ` - Where-Object { $_.Name -eq $params.Name } + Where-Object { $_.Name -eq $params.Name } if ($null -eq $managedProperty) { return @{ diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchMetadataCategory/MSFT_SPSearchMetadataCategory.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchMetadataCategory/MSFT_SPSearchMetadataCategory.psm1 index 38ce02761..b9fa8233f 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchMetadataCategory/MSFT_SPSearchMetadataCategory.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchMetadataCategory/MSFT_SPSearchMetadataCategory.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -54,7 +57,7 @@ function Get-TargetResource throw $message } $category = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa | ` - Where-Object { $_.Name -eq $params.Name } + Where-Object { $_.Name -eq $params.Name } if ($null -eq $category) { return @{ diff --git a/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 index 3eb7b42a7..347620a43 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchResultSource/MSFT_SPSearchResultSource.psm1 @@ -1,3 +1,6 @@ +$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 db6d4db57..d82806705 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchServiceApp/MSFT_SPSearchServiceApp.psm1 @@ -1,3 +1,6 @@ +$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_SPSearchServiceSettings/MSFT_SPSearchServiceSettings.psm1 b/SharePointDsc/DSCResources/MSFT_SPSearchServiceSettings/MSFT_SPSearchServiceSettings.psm1 index 55423ed90..59d501caf 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchServiceSettings/MSFT_SPSearchServiceSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchServiceSettings/MSFT_SPSearchServiceSettings.psm1 @@ -1,3 +1,6 @@ +$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 60f72bec4..5aa3b4d0a 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSearchTopology/MSFT_SPSearchTopology.psm1 @@ -1,3 +1,6 @@ +$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 1a18c96c9..8f3d2596b 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSecureStoreServiceApp/MSFT_SPSecureStoreServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 9a951dc66..64c4c2af9 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/MSFT_SPSecurityTokenServiceConfig.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSecurityTokenServiceConfig/MSFT_SPSecurityTokenServiceConfig.psm1 @@ -1,3 +1,6 @@ +$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 d9b758e62..80278ee86 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSelfServiceSiteCreation/MSFT_SPSelfServiceSiteCreation.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSelfServiceSiteCreation/MSFT_SPSelfServiceSiteCreation.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -155,13 +158,16 @@ function Get-TargetResource switch ($webApplication.SiteCreationUserExperienceVersion) { "Version1" - { $userExperienceVersion = "Classic" + { + $userExperienceVersion = "Classic" } "Version2" - { $userExperienceVersion = "Modern" + { + $userExperienceVersion = "Modern" } "Latest" - { $userExperienceVersion = "Latest" + { + $userExperienceVersion = "Latest" } } } @@ -438,13 +444,16 @@ function Set-TargetResource switch ($params.UserExperienceVersion) { "Modern" - { $newValue = [Microsoft.SharePoint.Administration.SiteCreationUserExperienceVersion]::Version2 + { + $newValue = [Microsoft.SharePoint.Administration.SiteCreationUserExperienceVersion]::Version2 } "Classic" - { $newValue = [Microsoft.SharePoint.Administration.SiteCreationUserExperienceVersion]::Version1 + { + $newValue = [Microsoft.SharePoint.Administration.SiteCreationUserExperienceVersion]::Version1 } "Latest" - { $newValue = [Microsoft.SharePoint.Administration.SiteCreationUserExperienceVersion]::Latest + { + $newValue = [Microsoft.SharePoint.Administration.SiteCreationUserExperienceVersion]::Latest } } diff --git a/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 b/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 index 3347c26f8..283a3dfed 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceAppPool/MSFT_SPServiceAppPool.psm1 @@ -1,3 +1,6 @@ +$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 242cae557..631610c75 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceAppProxyGroup/MSFT_SPServiceAppProxyGroup.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -205,9 +208,9 @@ function Set-TargetResource { $ServiceProxyName = $difference.InputObject $ServiceProxy = Get-SPServiceApplicationProxy | ` - Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } + Where-Object -FilterScript { + $_.DisplayName -eq $ServiceProxyName + } if (!$ServiceProxy) { @@ -227,9 +230,9 @@ function Set-TargetResource { $ServiceProxyName = $difference.InputObject $ServiceProxy = Get-SPServiceApplicationProxy | ` - Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } + Where-Object -FilterScript { + $_.DisplayName -eq $ServiceProxyName + } if (!$ServiceProxy) { @@ -290,9 +293,9 @@ function Set-TargetResource { $ServiceProxyName = $difference.InputObject $ServiceProxy = Get-SPServiceApplicationProxy | ` - Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } + Where-Object -FilterScript { + $_.DisplayName -eq $ServiceProxyName + } if (!$ServiceProxy) { @@ -316,9 +319,9 @@ function Set-TargetResource foreach ($ServiceProxyName in $params.ServiceAppProxies) { $ServiceProxy = Get-SPServiceApplicationProxy | ` - Where-Object -FilterScript { - $_.DisplayName -eq $ServiceProxyName - } + Where-Object -FilterScript { + $_.DisplayName -eq $ServiceProxyName + } if (!$ServiceProxy) { diff --git a/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 b/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 index 32818e269..e9e54711a 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceAppSecurity/MSFT_SPServiceAppSecurity.psm1 @@ -1,3 +1,6 @@ +$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 a9a326a1a..7ab560e44 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/MSFT_SPServiceIdentity.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceIdentity/MSFT_SPServiceIdentity.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -43,16 +46,20 @@ function Get-TargetResource switch ($processIdentity.CurrentIdentityType) { "LocalSystem" - { $ManagedAccount = "LocalSystem" + { + $ManagedAccount = "LocalSystem" } "NetworkService" - { $ManagedAccount = "NetworkService" + { + $ManagedAccount = "NetworkService" } "LocalService" - { $ManagedAccount = "LocalService" + { + $ManagedAccount = "LocalService" } Default - { $ManagedAccount = $processIdentity.Username + { + $ManagedAccount = $processIdentity.Username } } diff --git a/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 b/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 index a670975a4..89d809230 100644 --- a/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPServiceInstance/MSFT_SPServiceInstance.psm1 @@ -1,3 +1,6 @@ +$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 0a4274530..39c1c39ba 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSessionStateService/MSFT_SPSessionStateService.psm1 @@ -1,3 +1,6 @@ +$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 585a72b79..178046a78 100644 --- a/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPShellAdmins/MSFT_SPShellAdmins.psm1 @@ -1,3 +1,6 @@ +$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 fc38812fc..12e03e317 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 @@ -1,3 +1,6 @@ +$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 7a881e6ef..5cf26f459 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSitePropertyBag/MSFT_SPSitePropertyBag.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSitePropertyBag/MSFT_SPSitePropertyBag.psm1 @@ -1,4 +1,7 @@ -function Get-TargetResource() +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + +function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.HashTable])] diff --git a/SharePointDsc/DSCResources/MSFT_SPSiteUrl/MSFT_SPSiteUrl.psm1 b/SharePointDsc/DSCResources/MSFT_SPSiteUrl/MSFT_SPSiteUrl.psm1 index 6d3fa3390..af4c233d1 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSiteUrl/MSFT_SPSiteUrl.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSiteUrl/MSFT_SPSiteUrl.psm1 @@ -1,3 +1,6 @@ +$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 898446b95..53968d368 100644 --- a/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPStateServiceApp/MSFT_SPStateServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 c398b8e34..63bb60f3d 100644 --- a/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPSubscriptionSettingsServiceApp/MSFT_SPSubscriptionSettingsServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 b23917c98..10101eb54 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTimerJobState/MSFT_SPTimerJobState.psm1 @@ -1,3 +1,6 @@ +$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 2e0668a13..ede9a23ee 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuer/MSFT_SPTrustedIdentityTokenIssuer.psm1 @@ -1,3 +1,6 @@ +$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 8bc0f08b5..c84b48c38 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTrustedIdentityTokenIssuerProviderRealms/MSFT_SPTrustedIdentityTokenIssuerProviderRealms.psm1 @@ -1,3 +1,6 @@ +$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 9e96fc3ef..00c7c9abf 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTrustedRootAuthority/MSFT_SPTrustedRootAuthority.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -224,10 +227,10 @@ function Set-TargetResource { Write-Verbose -Message "Adding SPTrustedRootAuthority '$Name'" $null = Invoke-SPDscCommand -Credential $InstallAccount ` - -Arguments @($PSBoundParameters, $MyInvocation.MyCommand.Source) ` - -ScriptBlock { - $params = $args[0] - $eventSource = $args[1] + -Arguments @($PSBoundParameters, $MyInvocation.MyCommand.Source) ` + -ScriptBlock { + $params = $args[0] + $eventSource = $args[1] if ($params.ContainsKey("CertificateFilePath")) { diff --git a/SharePointDsc/DSCResources/MSFT_SPTrustedSecurityTokenIssuer/MSFT_SPTrustedSecurityTokenIssuer.psm1 b/SharePointDsc/DSCResources/MSFT_SPTrustedSecurityTokenIssuer/MSFT_SPTrustedSecurityTokenIssuer.psm1 index 4d78062ff..92f9250b5 100644 --- a/SharePointDsc/DSCResources/MSFT_SPTrustedSecurityTokenIssuer/MSFT_SPTrustedSecurityTokenIssuer.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPTrustedSecurityTokenIssuer/MSFT_SPTrustedSecurityTokenIssuer.psm1 @@ -1,3 +1,6 @@ +$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 d33689a47..21ea41ab6 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUsageApplication/MSFT_SPUsageApplication.psm1 @@ -1,3 +1,6 @@ +$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 a800c9ab8..21013cfca 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileProperty/MSFT_SPUserProfileProperty.psm1 @@ -1,3 +1,6 @@ +$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 b7079ae71..6de611393 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileSection/MSFT_SPUserProfileSection.psm1 @@ -1,3 +1,6 @@ +$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 22b7e0d07..706ffbc94 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceApp/MSFT_SPUserProfileServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 05ee3d3de..d6fed5da2 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.psm1 @@ -1,3 +1,6 @@ +$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 4e7dd4ff3..dcd2e17a5 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncConnection/MSFT_SPUserProfileSyncConnection.psm1 @@ -1,3 +1,6 @@ +$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 52a7dc4fa..4d49cf820 100644 --- a/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPUserProfileSyncService/MSFT_SPUserProfileSyncService.psm1 @@ -1,3 +1,6 @@ +$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 2efa358df..7b7815b20 100644 --- a/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPVisioServiceApp/MSFT_SPVisioServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 cf7929faa..9bc140f2a 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWeb/MSFT_SPWeb.psm1 @@ -1,3 +1,6 @@ +$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 a014703dc..2fe336b2a 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/MSFT_SPWebAppAuthentication.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppAuthentication/MSFT_SPWebAppAuthentication.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -1050,46 +1053,46 @@ function Test-ZoneConfiguration() "Classic" { $configuredMethod = $CurrentConfig | ` - Where-Object -FilterScript { - $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod - } + Where-Object -FilterScript { + $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod + } } "WindowsAuthentication" { if ($null -eq $zoneConfig.UseBasicAuth) { $configuredMethod = $CurrentConfig | ` - Where-Object -FilterScript { - $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` - $_.WindowsAuthMethod -eq $zoneConfig.WindowsAuthMethod - } + Where-Object -FilterScript { + $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` + $_.WindowsAuthMethod -eq $zoneConfig.WindowsAuthMethod + } } else { $configuredMethod = $CurrentConfig | ` - Where-Object -FilterScript { - $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` - $_.WindowsAuthMethod -eq $zoneConfig.WindowsAuthMethod -and ` - $_.UseBasicAuth -eq $zoneConfig.UseBasicAuth - } + Where-Object -FilterScript { + $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` + $_.WindowsAuthMethod -eq $zoneConfig.WindowsAuthMethod -and ` + $_.UseBasicAuth -eq $zoneConfig.UseBasicAuth + } } } "FBA" { $configuredMethod = $CurrentConfig | ` - Where-Object -FilterScript { - $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` - $_.MembershipProvider -eq $zoneConfig.MembershipProvider -and ` - $_.RoleProvider -eq $zoneConfig.RoleProvider - } + Where-Object -FilterScript { + $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` + $_.MembershipProvider -eq $zoneConfig.MembershipProvider -and ` + $_.RoleProvider -eq $zoneConfig.RoleProvider + } } "Federated" { $configuredMethod = $CurrentConfig | ` - Where-Object -FilterScript { - $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` - $_.AuthenticationProvider -eq $zoneConfig.AuthenticationProvider - } + Where-Object -FilterScript { + $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` + $_.AuthenticationProvider -eq $zoneConfig.AuthenticationProvider + } } } @@ -1149,42 +1152,42 @@ function Test-ZoneConfiguration() "Classic" { $specifiedMethod = $DesiredConfig | ` - Where-Object -FilterScript { - $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod - } + Where-Object -FilterScript { + $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod + } } "WindowsAuthentication" { $specifiedMethod = $DesiredConfig | ` - Where-Object -FilterScript { - $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` - $_.WindowsAuthMethod -eq $zoneConfig.WindowsAuthMethod - } + Where-Object -FilterScript { + $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` + $_.WindowsAuthMethod -eq $zoneConfig.WindowsAuthMethod + } if ($null -ne $specifiedMethod.UseBasicAuth) { $specifiedMethod = $specifiedMethod | ` - Where-Object -FilterScript { - $_.UseBasicAuth -eq $zoneConfig.UseBasicAuth - } + Where-Object -FilterScript { + $_.UseBasicAuth -eq $zoneConfig.UseBasicAuth + } } } "FBA" { $specifiedMethod = $DesiredConfig | ` - Where-Object -FilterScript { - $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` - $_.MembershipProvider -eq $zoneConfig.MembershipProvider -and ` - $_.RoleProvider -eq $zoneConfig.RoleProvider - } + Where-Object -FilterScript { + $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` + $_.MembershipProvider -eq $zoneConfig.MembershipProvider -and ` + $_.RoleProvider -eq $zoneConfig.RoleProvider + } } "Federated" { $specifiedMethod = $DesiredConfig | ` - Where-Object -FilterScript { - $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` - $_.AuthenticationProvider -eq $zoneConfig.AuthenticationProvider - } + Where-Object -FilterScript { + $_.AuthenticationMethod -eq $zoneConfig.AuthenticationMethod -and ` + $_.AuthenticationProvider -eq $zoneConfig.AuthenticationProvider + } } } diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 index c95548616..8a4ffa972 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppBlockedFileTypes/MSFT_SPWebAppBlockedFileTypes.psm1 @@ -1,3 +1,6 @@ +$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 5727132ea..d3d654857 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppClientCallableSettings/MSFT_SPWebAppClientCallableSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppClientCallableSettings/MSFT_SPWebAppClientCallableSettings.psm1 @@ -1,3 +1,6 @@ +$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 0aaee8a65..947d6a015 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppGeneralSettings/MSFT_SPWebAppGeneralSettings.psm1 @@ -1,3 +1,6 @@ +$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 03dbe0f7c..fe13837e7 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/MSFT_SPWebAppPeoplePickerSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppPeoplePickerSettings/MSFT_SPWebAppPeoplePickerSettings.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-TargetResource { [CmdletBinding()] @@ -170,10 +173,10 @@ function Set-TargetResource foreach ($searchADDomain in $params.SearchActiveDirectoryDomains) { $configuredDomain = $wa.PeoplePickerSettings.SearchActiveDirectoryDomains | ` - Where-Object -FilterScript { - $_.DomainName -eq $searchADDomain.FQDN -and ` - $_.IsForest -eq $searchADDomain.IsForest - } + Where-Object -FilterScript { + $_.DomainName -eq $searchADDomain.FQDN -and ` + $_.IsForest -eq $searchADDomain.IsForest + } if ($null -eq $configuredDomain) { # Add domain @@ -280,10 +283,10 @@ function Test-TargetResource foreach ($searchADDomain in $SearchActiveDirectoryDomains) { $configuredDomain = $CurrentValues.SearchActiveDirectoryDomains | ` - Where-Object -FilterScript { - $_.FQDN -eq $searchADDomain.FQDN -and ` - $_.IsForest -eq $searchADDomain.IsForest - } + Where-Object -FilterScript { + $_.FQDN -eq $searchADDomain.FQDN -and ` + $_.IsForest -eq $searchADDomain.IsForest + } if ($null -eq $configuredDomain) { $message = "Current SearchActiveDirectoryDomains does not match the desired state." diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 index e172be475..c4ba92e60 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppPermissions/MSFT_SPWebAppPermissions.psm1 @@ -1,3 +1,6 @@ +$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 0ea2a6251..5839d16e8 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppPolicy/MSFT_SPWebAppPolicy.psm1 @@ -1,3 +1,6 @@ +$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 4a05c422d..e6b75b7c4 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppPropertyBag/MSFT_SPWebAppPropertyBag.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppPropertyBag/MSFT_SPWebAppPropertyBag.psm1 @@ -1,4 +1,7 @@ -function Get-TargetResource() +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + +function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.HashTable])] diff --git a/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 b/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 index 734837a63..6d8582c0b 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppProxyGroup/MSFT_SPWebAppProxyGroup.psm1 @@ -1,3 +1,6 @@ +$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 2f1c40b8c..190e694cc 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppSiteUseAndDeletion/MSFT_SPWebAppSiteUseAndDeletion.psm1 @@ -1,3 +1,6 @@ +$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 5a13a0e23..5a7098302 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/MSFT_SPWebAppSuiteBar.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppSuiteBar/MSFT_SPWebAppSuiteBar.psm1 @@ -1,3 +1,6 @@ +$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 7dd5619ad..668311415 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppThrottlingSettings/MSFT_SPWebAppThrottlingSettings.psm1 @@ -1,3 +1,6 @@ +$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 8d438ba41..b40330651 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebAppWorkflowSettings/MSFT_SPWebAppWorkflowSettings.psm1 @@ -1,3 +1,6 @@ +$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 6de59baad..1934b4527 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebApplication/MSFT_SPWebApplication.psm1 @@ -1,3 +1,6 @@ +$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 c450a5b50..1044e5e75 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebApplicationAppDomain/MSFT_SPWebApplicationAppDomain.psm1 @@ -1,3 +1,6 @@ +$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 e399e650b..b49a056ad 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWebApplicationExtension/MSFT_SPWebApplicationExtension.psm1 @@ -1,3 +1,6 @@ +$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 937cf6de6..c7122f944 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWordAutomationServiceApp/MSFT_SPWordAutomationServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 e3808fa8e..3f39956b4 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWorkManagementServiceApp/MSFT_SPWorkManagementServiceApp.psm1 @@ -1,3 +1,6 @@ +$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 d81c707e5..ffcb82dad 100644 --- a/SharePointDsc/DSCResources/MSFT_SPWorkflowService/MSFT_SPWorkflowService.psm1 +++ b/SharePointDsc/DSCResources/MSFT_SPWorkflowService/MSFT_SPWorkflowService.psm1 @@ -1,3 +1,6 @@ +$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 3a81f0532..2f9fd5fb6 100644 --- a/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.ContentDatabase/SPContentDatabase.psm1 @@ -1,3 +1,6 @@ +$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 9763b518f..0c97dfd37 100644 --- a/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.Farm/SPFarm.psm1 @@ -1,3 +1,6 @@ +$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 eac0af724..4db20307f 100644 --- a/SharePointDsc/Modules/SharePointDsc.ProjectServerConnector/SharePointDsc.ProjectServerConnector.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.ProjectServerConnector/SharePointDsc.ProjectServerConnector.psm1 @@ -1,8 +1,5 @@ -$script:resourceModulePath = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent -$script:modulesFolderPath = Join-Path -Path $script:resourceModulePath -ChildPath 'Modules' - -$script:resourceHelperModulePath = Join-Path -Path $script:modulesFolderPath -ChildPath 'SharePointDsc.Util' -Import-Module -Name (Join-Path -Path $script:resourceHelperModulePath -ChildPath 'SharePointDsc.Util.psm1') +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath function Get-SPDscProjectServerGlobalPermissionId { diff --git a/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 b/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 index b4049ced6..202a171a1 100644 --- a/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.Search/SPSearchContentSource.Schedules.psm1 @@ -1,3 +1,6 @@ +$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.ServiceAppSecurity/SPServiceAppSecurity.psm1 b/SharePointDsc/Modules/SharePointDsc.ServiceAppSecurity/SPServiceAppSecurity.psm1 index 3221d8115..c8f2b80a8 100644 --- a/SharePointDsc/Modules/SharePointDsc.ServiceAppSecurity/SPServiceAppSecurity.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.ServiceAppSecurity/SPServiceAppSecurity.psm1 @@ -1,3 +1,6 @@ +$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.psd1 b/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psd1 new file mode 100644 index 000000000..c9a014600 --- /dev/null +++ b/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psd1 @@ -0,0 +1,125 @@ +# +# Module manifest for module 'SharePointDsc.Util' +# +# Generated by: DSC Community +# +# Generated on: 3-2-2021 +# + +@{ + + # Script module or binary module file associated with this manifest. + RootModule = 'SharePointDsc.Util.psm1' + + # Version number of this module. + ModuleVersion = '1.0.0' + + # ID used to uniquely identify this module + GUID = 'f6a011ea-5e00-4927-a0f9-a12d234b2c02' + + # Author of this module + Author = 'DSC Community' + + # Company or vendor of this module + CompanyName = 'DSC Community' + + # Copyright statement for this module + Copyright = 'Copyright the DSC Community contributors. All rights reserved.' + + # Description of the functionality provided by this module + Description = 'Functions used by the DSC resources in SharePointDsc.' + + # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. + FunctionsToExport = @( + 'Add-SPDscEvent', + 'Add-SPDscUserToLocalAdmin', + 'Clear-SPDscKerberosToken', + 'Compare-PSCustomObjectArrays', + 'Convert-SPDscADGroupIDToName', + 'Convert-SPDscADGroupNameToID', + 'Convert-SPDscArrayToString', + 'Convert-SPDscCIMInstanceToString', + 'Convert-SPDscHashtableToString', + 'ConvertTo-ReverseString', + 'ConvertTo-TwoDigitFlipString', + 'Format-OfficePatchGUID', + 'Get-SPDscAssemblyVersion', + 'Get-SPDscBuildVersion', + 'Get-SPDscContentService', + 'Get-SPDscFarmAccount', + 'Get-SPDscFarmAccountName', + 'Get-SPDscFarmProductsInfo', + 'Get-SPDscFarmVersionInfo', + 'Get-SPDscInstalledProductVersion', + 'Get-SPDscOSVersion', + 'Get-SPDscRegistryKey', + 'Get-SPDscRegProductsInfo', + 'Get-SPDscServerPatchStatus', + 'Get-SPDscServiceContext', + 'Get-SPDscUserProfileSubTypeManager', + 'Invoke-SPDscCommand', + 'Remove-SPDscGenericObject', + 'Remove-SPDscUserToLocalAdmin', + 'Remove-SPDscZoneMap', + 'Rename-SPDscParamValue', + 'Resolve-SPDscSecurityIdentifier', + 'Set-SPDscObjectPropertyIfValuePresent', + 'Set-SPDscZoneMap', + 'Start-SharePointDSCExtract', + 'Test-SPDscIsADUser', + 'Test-SPDscObjectHasProperty', + 'Test-SPDscParameterState', + 'Test-SPDscRunAsCredential', + 'Test-SPDscRunningAsFarmAccount', + 'Test-SPDscUserIsLocalAdmin' + ) + + # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. + CmdletsToExport = @() + + # Variables to export from this module + VariablesToExport = @() + + # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. + AliasesToExport = @() + + # DSC resources to export from this module + # DscResourcesToExport = @() + + # List of all modules packaged with this module + # ModuleList = @() + + # List of all files packaged with this module + # FileList = @() + + # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. + PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + # Tags = @() + + # A URL to the license for this module. + # LicenseUri = '' + + # A URL to the main website for this project. + # ProjectUri = '' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + # ReleaseNotes = '' + + } # End of PSData hashtable + + } # End of PrivateData hashtable + + # HelpInfo URI of this module + # HelpInfoURI = '' + + # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. + # DefaultCommandPrefix = '' + +} diff --git a/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 b/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 index 05de7e5f3..f4b68e382 100644 --- a/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 @@ -1665,5 +1665,3 @@ function Start-SharePointDSCExtract Write-Host -Object " - We couldn't detect a SharePoint installation on this machine. Please execute the SharePoint ReverseDSC script on an existing SharePoint server." -BackgroundColor Red -ForegroundColor Black } } - -Export-ModuleMember -Function * diff --git a/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 b/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 index 8b78996bc..453db22d8 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebAppPolicy/SPWebAppPolicy.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Assert-SPDscPolicyUser() { param @@ -11,7 +14,7 @@ function Assert-SPDscPolicyUser() $UsernameToCheck ) - $diffcol = $CurrentDifferences | Where { $_.Username -eq $UsernameToCheck } + $diffcol = $CurrentDifferences | Where-Object { $_.Username -eq $UsernameToCheck } if ($diffcol.Count -gt 0) { return $true diff --git a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 index 560f5bf6b..3b81e217a 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.BlockedFileTypes.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-SPDscWebApplicationBlockedFileTypeConfig { [CmdletBinding()] @@ -184,4 +187,3 @@ function Test-SPDscWebApplicationBlockedFileTypeConfig } return $true } - diff --git a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 index 26decac17..d75050f22 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.GeneralSettings.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-SPDscWebApplicationGeneralConfig { [CmdletBinding()] @@ -146,4 +149,3 @@ function Test-SPDscWebApplicationGeneralConfig -ValuesToCheck $valuesToCheck return $testReturn } - diff --git a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 index 7e5603b7a..9a4adfab6 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Throttling.psm1 @@ -1,3 +1,6 @@ +$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 5b32e8169..0804cdcb3 100644 --- a/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.WebApplication/SPWebApplication.Workflow.psm1 @@ -1,3 +1,6 @@ +$script:SPDscUtilModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SharePointDsc.Util' +Import-Module -Name $script:SPDscUtilModulePath + function Get-SPDscWebApplicationWorkflowConfig { [CmdletBinding()] @@ -8,9 +11,9 @@ function Get-SPDscWebApplicationWorkflowConfig $WebApplication ) return @{ - ExternalWorkflowParticipantsEnabled = ` + ExternalWorkflowParticipantsEnabled = ` $WebApplication.ExternalWorkflowParticipantsEnabled - UserDefinedWorkflowsEnabled = ` + UserDefinedWorkflowsEnabled = ` $WebApplication.UserDefinedWorkflowsEnabled EmailToNoPermissionWorkflowParticipantsEnable = ` $WebApplication.EmailToNoPermissionWorkflowParticipantsEnabled @@ -66,12 +69,11 @@ function Test-SPDscWebApplicationWorkflowConfig $relPath = "..\..\Modules\SharePointDsc.Util\SharePointDsc.Util.psm1" Import-Module (Join-Path $PSScriptRoot $relPath -Resolve) $valuesTocheck = @("UserDefinedWorkflowsEnabled", - "EmailToNoPermissionWorkflowParticipantsEnable", - "ExternalWorkflowParticipantsEnabled") + "EmailToNoPermissionWorkflowParticipantsEnable", + "ExternalWorkflowParticipantsEnabled") $testReturn = Test-SPDscParameterState -CurrentValues $CurrentSettings ` - -DesiredValues $DesiredSettings ` - -ValuesToCheck $valuesTocheck ` - -Source $Source + -DesiredValues $DesiredSettings ` + -ValuesToCheck $valuesTocheck ` + -Source $Source return $testReturn } - diff --git a/SharePointDsc/SharePointDsc.psd1 b/SharePointDsc/SharePointDsc.psd1 index 014a662b1..858d59f0b 100644 --- a/SharePointDsc/SharePointDsc.psd1 +++ b/SharePointDsc/SharePointDsc.psd1 @@ -68,7 +68,7 @@ # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess - NestedModules = @("Modules\SharePointDsc.Util\SharePointDsc.Util.psm1") + NestedModules = @("Modules\SharePointDsc.Util\SharePointDsc.Util.psd1") # Functions to export from this module FunctionsToExport = @( @@ -144,6 +144,7 @@ 'SPAppManagementServiceApp', 'SPAppStoreSettings', 'SPAuthenticationRealm', + 'SPAzureAccessControlServiceAppProxy', 'SPBCSServiceApp', 'SPBlobCacheSettings', 'SPCacheAccounts', @@ -155,6 +156,7 @@ 'SPDiagnosticsProvider', 'SPDistributedCacheClientSettings', 'SPDistributedCacheService', + 'SPDocIcon', 'SPExcelServiceApp', 'SPFarm', 'SPFarmAdministrators', @@ -175,6 +177,7 @@ 'SPManagedMetadataServiceAppDefault', 'SPManagedPath', 'SPMinRoleCompliance', + 'SPOAppPrincipalMgmtServiceAppProxy', 'SPOfficeOnlineServerBinding', 'SPOutgoingEmailSettings', 'SPPasswordChangeSettings',