xDSCResourceDesigner icon indicating copy to clipboard operation
xDSCResourceDesigner copied to clipboard

New-xDscResourceProperty duplicate ValidateSet value causes DSC resource creation to silently fail

Open GoateePFE opened this issue 9 years ago • 0 comments

Here is repro code example:

$CertThumbprint = New-xDscResourceProperty -Name CertThumbprint -Type String -Attribute Key $CertStoreName = New-xDscResourceProperty -Name CertStoreName -Type String -Attribute Write $ServiceAccountToGrantPermission = New-xDscResourceProperty -Name ServiceAccountToGrantPermission -Type String -Attribute Write $FileSystemRight = New-xDscResourceProperty -Name FileSystemRight -Type String -Attribute Write -ValidateSet "Read", "ReadAndExecute", "Write", "ReadAndExecute", "Delete", "FullControl" $AccessControlType = New-xDscResourceProperty -Name AccessControlType -Type String -Attribute Write -ValidateSet "Allow", "Deny"

New-xDscResource -Name CLM_xLocalMachineCertKeyAccessControl -Property $CertThumbprint, $CertStoreName, $ServiceAccountToGrantPermission, $FileSystemRight, $AccessControlType -Path 'C:\Program Files\WindowsPowerShell\Modules' -ModuleName CLM_DSCModule

GoateePFE avatar Oct 05 '15 12:10 GoateePFE