diff --git a/DSCResources/MSFT_ADComputer/MSFT_ADComputer.psm1 b/DSCResources/MSFT_ADComputer/MSFT_ADComputer.psm1 index c8442e53f..16633f918 100644 --- a/DSCResources/MSFT_ADComputer/MSFT_ADComputer.psm1 +++ b/DSCResources/MSFT_ADComputer/MSFT_ADComputer.psm1 @@ -828,10 +828,10 @@ function Set-TargetResource Move-ADObject @moveADObjectParameters -TargetPath $Path } - $replaceComputerProperties = @{ } - $removeComputerProperties = @{ } + $replaceComputerProperties = @{} + $removeComputerProperties = @{} - # Get all properties, other than Path, that is not in desired state. + # Get all properties, other thans Path, that is not in desired state. $propertiesNotInDesiredState = $compareTargetResourceStateResult | Where-Object -FilterScript { $_.ParameterName -ne 'Path' -and -not $_.InDesiredState diff --git a/DSCResources/MSFT_ADDomainTrust/MSFT_ADDomainTrust.psm1 b/DSCResources/MSFT_ADDomainTrust/MSFT_ADDomainTrust.psm1 index 400da94ec..9a4dadb8a 100644 --- a/DSCResources/MSFT_ADDomainTrust/MSFT_ADDomainTrust.psm1 +++ b/DSCResources/MSFT_ADDomainTrust/MSFT_ADDomainTrust.psm1 @@ -492,7 +492,7 @@ function Compare-TargetResourceState Copy the hashtable $PSBoundParameters and add 'Ensure' property to make sure it is part of the DesiredValues. #> - $desiredValues = @{ } + $PSBoundParameters + $desiredValues = @{} + $PSBoundParameters $desiredValues['Ensure'] = $Ensure $compareResourcePropertyStateParameters = @{ diff --git a/DSCResources/MSFT_ADForestProperties/MSFT_ADForestProperties.psm1 b/DSCResources/MSFT_ADForestProperties/MSFT_ADForestProperties.psm1 index 48753f750..0a6eceea2 100644 --- a/DSCResources/MSFT_ADForestProperties/MSFT_ADForestProperties.psm1 +++ b/DSCResources/MSFT_ADForestProperties/MSFT_ADForestProperties.psm1 @@ -179,7 +179,7 @@ function Test-TargetResource $forest = Get-ADForest -Identity $ForestName # Validate parameters before we even attempt to retrieve anything - $assertMemberParameters = @{ } + $assertMemberParameters = @{} if ($PSBoundParameters.ContainsKey('ServicePrincipalNameSuffix') -and -not [system.string]::IsNullOrEmpty($ServicePrincipalNameSuffix)) { @@ -204,7 +204,7 @@ function Test-TargetResource $inDesiredState = $false } - $assertMemberParameters = @{ } + $assertMemberParameters = @{} if ($PSBoundParameters.ContainsKey('UserPrincipalNameSuffix') -and -not [system.string]::IsNullOrEmpty($UserPrincipalNameSuffix)) { diff --git a/DSCResources/MSFT_ADReplicationSiteLink/MSFT_ADReplicationSiteLink.psm1 b/DSCResources/MSFT_ADReplicationSiteLink/MSFT_ADReplicationSiteLink.psm1 index 63d4779f7..532a91b44 100644 --- a/DSCResources/MSFT_ADReplicationSiteLink/MSFT_ADReplicationSiteLink.psm1 +++ b/DSCResources/MSFT_ADReplicationSiteLink/MSFT_ADReplicationSiteLink.psm1 @@ -209,7 +209,7 @@ function Set-TargetResource $replaceParameters = @{} # build the SitesIncluded hashtable. - $sitesIncludedParameters = @{ } + $sitesIncludedParameters = @{} if ($SitesExcluded) { Write-Verbose -Message ($script:localizedData.RemovingSites -f $($SiteExcluded -join ', '), $Name) diff --git a/DSCResources/MSFT_ADServicePrincipalName/MSFT_ADServicePrincipalName.psm1 b/DSCResources/MSFT_ADServicePrincipalName/MSFT_ADServicePrincipalName.psm1 index ba737ea8e..13eaff529 100644 --- a/DSCResources/MSFT_ADServicePrincipalName/MSFT_ADServicePrincipalName.psm1 +++ b/DSCResources/MSFT_ADServicePrincipalName/MSFT_ADServicePrincipalName.psm1 @@ -112,7 +112,9 @@ function Set-TargetResource { Write-Verbose -Message ($script:localizedData.RemoveServicePrincipalName -f $ServicePrincipalName, $spnAccount.SamAccountName) - Set-ADObject -Identity $spnAccount.DistinguishedName -Remove @{ ServicePrincipalName = $ServicePrincipalName } + Set-ADObject -Identity $spnAccount.DistinguishedName -Remove @{ + ServicePrincipalName = $ServicePrincipalName + } } } @@ -139,7 +141,9 @@ function Set-TargetResource { Write-Verbose -Message ($script:localizedData.RemoveServicePrincipalName -f $ServicePrincipalName, $spnAccount.SamAccountName) - Set-ADObject -Identity $spnAccount.DistinguishedName -Remove @{ ServicePrincipalName = $ServicePrincipalName } + Set-ADObject -Identity $spnAccount.DistinguishedName -Remove @{ + ServicePrincipalName = $ServicePrincipalName + } } } } diff --git a/DSCResources/MSFT_ADUser/MSFT_ADUser.psm1 b/DSCResources/MSFT_ADUser/MSFT_ADUser.psm1 index bc757f2a2..71deecb0e 100644 --- a/DSCResources/MSFT_ADUser/MSFT_ADUser.psm1 +++ b/DSCResources/MSFT_ADUser/MSFT_ADUser.psm1 @@ -1650,7 +1650,7 @@ function Set-TargetResource $setADUserParams = Get-ADCommonParameters @PSBoundParameters - $replaceUserProperties = @{ } + $replaceUserProperties = @{} $clearUserProperties = @() $moveUserRequired = $false $renameUserRequired = $false