also add gpo workbench ou

This commit is contained in:
abrown38 committed 2024-08-13 21:39:15 +01:00
1 parent 937c3839ca
commit b87daf4765
1 file changed
+3 -1
@@ -329,12 +329,14 @@ $DomainName = "$winProject.loc"
# Create and link GPO
New-GPO -Name $GpoName
New-GPLink -Name $GpoName -Target "DC=$($DomainName.Split('.')[0]),DC=$($DomainName.Split('.')[1])"
# Configure GPO to disable Windows Firewall
Set-GPRegistryValue -Name $GpoName -Key "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile" -ValueName "EnableFirewall" -Type DWord -Value 0
Set-GPRegistryValue -Name $GpoName -Key "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile" -ValueName "EnableFirewall" -Type DWord -Value 0
Set-GPRegistryValue -Name $GpoName -Key "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile" -ValueName "EnableFirewall" -Type DWord -Value 0
New-GPLink -Name $GpoName -Target "DC=$($DomainName.Split('.')[0]),DC=$($DomainName.Split('.')[1])"
New-GPLink -Name $GpoName -Target $workbenchOU
############# Workaround - Adam #############
#Import-Module -Name NetSecurity