Closed erwinwildenburg closed 7 years ago
Fixes https://github.com/dlwyatt/PolicyFileEditor/issues/5.
Before this change this works for Invoke-DscResource:
$DscParams = @{} $DscParams.Add("Ensure", "Present") $DscParams.Add("KeyValueName", "'SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\LicenseServers") $DscParams.Add("PolicyType", "Machine") $DscParams.Add("Data", @("something.contoso.com")) $DscParams.Add("Type", 1) Invoke-DscResource -Name cAdministrativeTemplateSetting -ModuleName "PolicyFileEditor" -Method Test -Property $dscparams
After this change this works:
$DscParams = @{} $DscParams.Add("Ensure", "Present") $DscParams.Add("KeyValueName", "'SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\LicenseServers") $DscParams.Add("PolicyType", "Machine") $DscParams.Add("Data", @("something.contoso.com")) $DscParams.Add("Type", "String") Invoke-DscResource -Name cAdministrativeTemplateSetting -ModuleName "PolicyFileEditor" -Method Test -Property $dscparams
It saves the strange type conversion and makes it more consistent.
Thanks! :)
Fixes https://github.com/dlwyatt/PolicyFileEditor/issues/5.
Before this change this works for Invoke-DscResource:
After this change this works:
It saves the strange type conversion and makes it more consistent.