Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SSvilen committed Oct 20, 2019
1 parent c3c93ba commit 98a61aa
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
6 changes: 3 additions & 3 deletions DSCResources/MSFT_ADComputer/MSFT_ADComputer.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion DSCResources/MSFT_ADDomainTrust/MSFT_ADDomainTrust.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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 = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand All @@ -204,7 +204,7 @@ function Test-TargetResource
$inDesiredState = $false
}

$assertMemberParameters = @{ }
$assertMemberParameters = @{}

if ($PSBoundParameters.ContainsKey('UserPrincipalNameSuffix') -and -not [system.string]::IsNullOrEmpty($UserPrincipalNameSuffix))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

Expand All @@ -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
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion DSCResources/MSFT_ADUser/MSFT_ADUser.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,7 @@ function Set-TargetResource

$setADUserParams = Get-ADCommonParameters @PSBoundParameters

$replaceUserProperties = @{ }
$replaceUserProperties = @{}
$clearUserProperties = @()
$moveUserRequired = $false
$renameUserRequired = $false
Expand Down

0 comments on commit 98a61aa

Please sign in to comment.