mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-31 11:40:15 +00:00
also add gpo workbench ou
This commit is contained in:
1 parent
937c3839ca
commit
b87daf4765
1 file changed
+3
-1
@@ -329,12 +329,14 @@ $DomainName = "$winProject.loc"
|
|||||||
|
|
||||||
# Create and link GPO
|
# Create and link GPO
|
||||||
New-GPO -Name $GpoName
|
New-GPO -Name $GpoName
|
||||||
New-GPLink -Name $GpoName -Target "DC=$($DomainName.Split('.')[0]),DC=$($DomainName.Split('.')[1])"
|
|
||||||
|
|
||||||
# Configure GPO to disable Windows Firewall
|
# 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\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\PrivateProfile" -ValueName "EnableFirewall" -Type DWord -Value 0
|
||||||
Set-GPRegistryValue -Name $GpoName -Key "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile" -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 #############
|
############# Workaround - Adam #############
|
||||||
|
|
||||||
#Import-Module -Name NetSecurity
|
#Import-Module -Name NetSecurity
|
||||||
|
|||||||
Reference in new issue
Block a user