From 1867c3da88a07b0ac3b5e5e0be8accaa9f991133 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 16 May 2024 19:04:21 +0200 Subject: [PATCH] fix: Revert policies for Windows 7 and 2008 R2 (#510) --- assets/win2008r2-eval.xml | 18 +++++++++++------- assets/win2008r2.xml | 18 +++++++++++------- assets/win7x64-enterprise.xml | 18 +++++++++++------- assets/win7x64-ultimate.xml | 18 +++++++++++------- assets/win7x64.xml | 18 +++++++++++------- assets/win7x86-enterprise.xml | 18 +++++++++++------- assets/win7x86-ultimate.xml | 18 +++++++++++------- assets/win7x86.xml | 18 +++++++++++------- 8 files changed, 88 insertions(+), 56 deletions(-) diff --git a/assets/win2008r2-eval.xml b/assets/win2008r2-eval.xml index 230743c..4f69250 100644 --- a/assets/win2008r2-eval.xml +++ b/assets/win2008r2-eval.xml @@ -173,6 +173,15 @@ 0 + + + + true + Remote Desktop + all + + + @@ -284,21 +293,16 @@ 15 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "NetDIS.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes Enable Network Discovery 16 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "FPS-.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Enable File Sharing 17 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "RemoteDesktop-[^I].*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" - Add RDP in firewall - - - 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2008r2.xml b/assets/win2008r2.xml index 9b2a0d7..18bf9f3 100644 --- a/assets/win2008r2.xml +++ b/assets/win2008r2.xml @@ -176,6 +176,15 @@ 0 + + + + true + Remote Desktop + all + + + @@ -287,21 +296,16 @@ 15 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "NetDIS.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes Enable Network Discovery 16 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "FPS-.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Enable File Sharing 17 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "RemoteDesktop-[^I].*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" - Add RDP in firewall - - - 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64-enterprise.xml b/assets/win7x64-enterprise.xml index e57a310..6934dd5 100644 --- a/assets/win7x64-enterprise.xml +++ b/assets/win7x64-enterprise.xml @@ -177,6 +177,15 @@ 0 + + + + true + Remote Desktop + all + + + @@ -288,21 +297,16 @@ 15 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "NetDIS.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes Enable Network Discovery 16 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "FPS-.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Enable File Sharing 17 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "RemoteDesktop-[^I].*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" - Add RDP in firewall - - - 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64-ultimate.xml b/assets/win7x64-ultimate.xml index dc17ba5..6e6e36c 100644 --- a/assets/win7x64-ultimate.xml +++ b/assets/win7x64-ultimate.xml @@ -177,6 +177,15 @@ 0 + + + + true + Remote Desktop + all + + + @@ -288,21 +297,16 @@ 15 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "NetDIS.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes Enable Network Discovery 16 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "FPS-.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Enable File Sharing 17 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "RemoteDesktop-[^I].*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" - Add RDP in firewall - - - 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64.xml b/assets/win7x64.xml index 90c699d..29c0ab7 100644 --- a/assets/win7x64.xml +++ b/assets/win7x64.xml @@ -177,6 +177,15 @@ 0 + + + + true + Remote Desktop + all + + + @@ -288,21 +297,16 @@ 15 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "NetDIS.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes Enable Network Discovery 16 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "FPS-.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Enable File Sharing 17 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "RemoteDesktop-[^I].*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" - Add RDP in firewall - - - 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x86-enterprise.xml b/assets/win7x86-enterprise.xml index bdd8d26..11c78b6 100644 --- a/assets/win7x86-enterprise.xml +++ b/assets/win7x86-enterprise.xml @@ -177,6 +177,15 @@ 0 + + + + true + Remote Desktop + all + + + @@ -288,21 +297,16 @@ 15 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "NetDIS.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes Enable Network Discovery 16 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "FPS-.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Enable File Sharing 17 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "RemoteDesktop-[^I].*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" - Add RDP in firewall - - - 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x86-ultimate.xml b/assets/win7x86-ultimate.xml index 54a7407..221ef90 100644 --- a/assets/win7x86-ultimate.xml +++ b/assets/win7x86-ultimate.xml @@ -177,6 +177,15 @@ 0 + + + + true + Remote Desktop + all + + + @@ -288,21 +297,16 @@ 15 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "NetDIS.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes Enable Network Discovery 16 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "FPS-.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Enable File Sharing 17 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "RemoteDesktop-[^I].*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" - Add RDP in firewall - - - 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x86.xml b/assets/win7x86.xml index ff8b8f0..c243898 100644 --- a/assets/win7x86.xml +++ b/assets/win7x86.xml @@ -177,6 +177,15 @@ 0 + + + + true + Remote Desktop + all + + + @@ -288,21 +297,16 @@ 15 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "NetDIS.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes Enable Network Discovery 16 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "FPS-.*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" + netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Enable File Sharing 17 - powershell -ExecutionPolicy ByPass -Command "Enable-NetFirewallRule -DisplayGroup @(Get-NetFirewallRule | Where-Object Name -Match "RemoteDesktop-[^I].*" | Select-Object DisplayGroup -Unique | % DisplayGroup)" - Add RDP in firewall - - - 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists