diff --git a/DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1 b/DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1 index c8056d59d..c664e423f 100644 --- a/DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1 +++ b/DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1 @@ -123,7 +123,8 @@ function Get-TargetResource $domain = Get-ADDomain -Identity $domainFQDN -ErrorAction Stop $forest = Get-ADForest -Identity $domain.Forest -ErrorAction Stop } - else { + else + { Write-Verbose ($script:localizedData.QueryDomainWithCredential -f $domainFQDN) $domain = Get-ADDomain -Identity $domainFQDN -Credential $DomainAdministratorCredential -ErrorAction Stop $forest = Get-ADForest -Identity $domain.Forest -Credential $DomainAdministratorCredential -ErrorAction Stop diff --git a/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1 b/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1 index b542b5630..b3aad6443 100644 --- a/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1 +++ b/DSCResources/MSFT_xADUser/MSFT_xADUser.psm1 @@ -149,7 +149,6 @@ $adPropertyMap = @( UseCmdletParameter = $true } @{ - Parameter = 'TrustedForDelegation' UseCmdletParameter = $true } @@ -530,12 +529,14 @@ function Get-TargetResource { $targetResource['ServicePrincipalNames'] = [System.String[]]$adUser.ServicePrincipalNames } - elseif (($property.Parameter) -eq 'ChangePasswordAtLogon') { + elseif (($property.Parameter) -eq 'ChangePasswordAtLogon') + { if ($adUser.pwdlastset -eq 0) { $targetResource['ChangePasswordAtLogon'] = $true } - else { + else + { $targetResource['ChangePasswordAtLogon'] = $false } }