Skip to content

Commit

Permalink
Fix review comments at r3
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Jun 15, 2019
1 parent 039043e commit aabb55e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions DSCResources/MSFT_xADUser/MSFT_xADUser.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ $adPropertyMap = @(
UseCmdletParameter = $true
}
@{

Parameter = 'TrustedForDelegation'
UseCmdletParameter = $true
}
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit aabb55e

Please sign in to comment.