small fix

This commit is contained in:
abrown38 committed 2024-08-13 21:38:58 +01:00
1 parent 8174b098e2
commit 937c3839ca
1 file changed
+3
@@ -219,9 +219,12 @@ Set-SystemAuditPolicy -Policy 'Security System Extension' -Value Success -UseAud
# 3 LINES BELOW DONT WORK NO GPO CALLED "Default Domain Controller Policy"
#DC only
New-GPO -Name "Default Domain Controller Policy" -comment "Default policy for domain controllers"
Set-GPRegistryValue -Name "Default Domain Controller Policy" -ValueName "LdapEnforceChannelBinding" -key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters" -Value 2 -Type DWord
Set-GPRegistryValue -Name "Default Domain Controller Policy" -ValueName "LDAPServerIntegrity" -key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters" -Value 2 -Type DWord
Set-GPRegistryValue -Name "Default Domain Controller Policy" -ValueName "" -key "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters -> NullSessionPipes" -Value LSARPC, NETLOGON, SAMR -Type MultiString
$DCOU = (Get-ADOrganizationalUnit -Identity "OU=Domain Controllers,$DomainOU").DistinguishedName
New-GPLink -Name "Default Domain Controller Policy" -Target $DCOU
$domainid = $DomainInfo.Name