Hi Dave, I'm running into an issue when using PolicyFileEditor with DSC:
For eg, the script below works fine, sets the Group Policy as expected:
$UserDir = "$env:windir\system32\GroupPolicy\Machine\Registry.pol"
$RegPath = 'Software\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths\'
$RegName = '\*\NETLOGON' # Backslash Backslash Asterisk Backslash NETLOGON
$RegData = 'RequireMutualAuthentication=1, RequireIntegrity=1, RequirePrivacy=1'
$RegType = 'String'
Set-PolicyFileEntry -Path $UserDir -Key $RegPath -ValueName $RegName -Data $RegData -Type $RegType
gpupdate
But not sure how to include "\*\NETLOGON" as ValueName for Key 'Software\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths\' when using in DSC? I've tried it in few different ways, but couldn't get it working.
Hi Dave, I'm running into an issue when using PolicyFileEditor with DSC:
For eg, the script below works fine, sets the Group Policy as expected: $UserDir = "$env:windir\system32\GroupPolicy\Machine\Registry.pol" $RegPath = 'Software\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths\' $RegName = '\*\NETLOGON' # Backslash Backslash Asterisk Backslash NETLOGON $RegData = 'RequireMutualAuthentication=1, RequireIntegrity=1, RequirePrivacy=1' $RegType = 'String' Set-PolicyFileEntry -Path $UserDir -Key $RegPath -ValueName $RegName -Data $RegData -Type $RegType gpupdate
But not sure how to include "\*\NETLOGON" as ValueName for Key 'Software\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths\' when using in DSC? I've tried it in few different ways, but couldn't get it working.
cAdministrativeTemplateSetting 'Hardened UNC Paths NETLOGON' { KeyValueName = "Software\Policies\Microsoft\Windows\NetworkProvider\HardenedPaths\$([char]0x005C)$([char]0x005C)*$([char]0x005C)NETLOGON" PolicyType = 'Machine' Data = 'RequireMutualAuthentication=1, RequireIntegrity=1, RequirePrivacy=1' Ensure = 'Present' Type = 'String' }
Appreciate your help!!!