microsoft / BaselineManagement

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

REG_SZ can also be empty #63

Open wokis opened 3 years ago

wokis commented 3 years ago

REG_SZ key values can also be empty. Currently they are marked with a This MultiString Value has a value of $null comment and generate a The Write-DSCString command was called but the parameters block is missing a property name error.

https://github.com/microsoft/BaselineManagement/blob/bc23b244f7ee379427be22da2b5d575df5a9b4e6/src/Parsers/GPO/Registry.ps1#L357

https://github.com/microsoft/BaselineManagement/blob/bc23b244f7ee379427be22da2b5d575df5a9b4e6/src/Helpers/Functions.ps1#L416

wokis commented 3 years ago

An example of a policy using an empty REG_SZ as its default value is the "Select when Quality Updates are received"(https://admx.help/?Category=Windows_10_2016&Policy=Microsoft.Policies.WindowsUpdate::DeferQualityUpdates) policy. Specifically the Software\Policies\Microsoft\Windows\WindowsUpdate\PauseQualityUpdatesStartTime key.