microsoft / BaselineManagement

Conversion tool used to Convert Group Policy baselines into DSC
MIT License
266 stars 52 forks source link

ASC / UserRightAssignment.ps1 force needed for every setting. #18

Closed bdanse closed 4 years ago

bdanse commented 6 years ago

The following code is applied successfully but with not result in a compliant state if additional groups are included in the user right assignment.

src/Parsers/ASC/UserRightsAssignment.ps1 if ([string]::IsNullOrEmpty($Accounts)) { $policyHash.Force = $true; }
$policyHash.Policy = $Privilege; $policyHash.Identity = $Accounts

This will set the user rights as declared

$policyHash.Force = $true; $policyHash.Policy = $Privilege; $policyHash.Identity = $Accounts

bobbytreed commented 5 years ago

Just to clarify, The code above does not work as intended, and you think the IsNullOrEmpty check should be removed? That seems to be the only difference in the code.

mgreenegit commented 4 years ago

Closing stale.