Skip to content

Commit

Permalink
Fix if-blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Jun 15, 2019
1 parent 62657f6 commit 2220fbf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions DSCResources/MSFT_xADDomain/MSFT_xADDomain.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -378,18 +378,22 @@ function Set-TargetResource
$installADDSParams['DnsDelegationCredential'] = $DnsDelegationCredential
$installADDSParams['CreateDnsDelegation'] = $true
}

if ($PSBoundParameters.ContainsKey('DatabasePath'))
{
$installADDSParams['DatabasePath'] = $DatabasePath
}

if ($PSBoundParameters.ContainsKey('LogPath'))
{
$installADDSParams['LogPath'] = $LogPath
}

if ($PSBoundParameters.ContainsKey('SysvolPath'))
{
$installADDSParams['SysvolPath'] = $SysvolPath
}

if ($PSBoundParameters.ContainsKey('DomainMode'))
{
$installADDSParams['DomainMode'] = $DomainMode
Expand All @@ -402,6 +406,7 @@ function Set-TargetResource
$installADDSParams['NewDomainName'] = $DomainName
$installADDSParams['ParentDomainName'] = $ParentDomainName
$installADDSParams['DomainType'] = 'ChildDomain'

if ($PSBoundParameters.ContainsKey('DomainNetBIOSName'))
{
$installADDSParams['NewDomainNetbiosName'] = $DomainNetBIOSName
Expand All @@ -415,10 +420,12 @@ function Set-TargetResource
{
Write-Verbose -Message ($script:localizedData.CreatingForest -f $DomainName)
$installADDSParams['DomainName'] = $DomainName

if ($PSBoundParameters.ContainsKey('DomainNetbiosName'))
{
$installADDSParams['DomainNetbiosName'] = $DomainNetBIOSName
}

if ($PSBoundParameters.ContainsKey('ForestMode'))
{
$installADDSParams['ForestMode'] = $ForestMode
Expand Down

0 comments on commit 2220fbf

Please sign in to comment.