From 197077f14790a1c24248253ca4b4cdff2e8ac228 Mon Sep 17 00:00:00 2001 From: Winston Smith Date: Mon, 10 May 2021 12:18:00 +0200 Subject: [PATCH] fix: Change Routing role to remove useless ones --- Guests/RTR-01.ps1 | 12 +++--------- Guests/RTR-02.ps1 | 10 +++------- Guests/RTR-03.ps1 | 10 +++------- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/Guests/RTR-01.ps1 b/Guests/RTR-01.ps1 index 1657c5f..b402e99 100644 --- a/Guests/RTR-01.ps1 +++ b/Guests/RTR-01.ps1 @@ -60,16 +60,10 @@ foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; ### Install Routing and necessary linked roles ### -echo "Installing Remote-Access, RSAT, Routing" -Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools - -# End of scritlet - -### Install VPN (necessary?) ### - -echo "Installing VPN" -echo "Install-remoteAccess -VpnType Routingonly" +echo "installing VPN routing role" Install-remoteAccess -VpnType Routingonly +set-service RemoteAccess -StartupType Automatic +Start-Service RemoteAccess # End of scritlet diff --git a/Guests/RTR-02.ps1 b/Guests/RTR-02.ps1 index 7e0b83a..cfe7e5a 100644 --- a/Guests/RTR-02.ps1 +++ b/Guests/RTR-02.ps1 @@ -47,20 +47,16 @@ echo "Configuring Dns" foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('9.9.9.9') } #End -### Install Routing and necessary linked roles + autostart +### Install VPN (?) -echo "Installing Remote-Access, RSAT, Routing + Auto-start" -Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools +echo "installing VPN routing role" +Install-remoteAccess -VpnType Routingonly set-service RemoteAccess -StartupType Automatic Start-Service RemoteAccess #END -### Install VPN (?) -echo "installing VPN routing role" -Install-remoteAccess -VpnType Routingonly -#End ### Set connection as Private diff --git a/Guests/RTR-03.ps1 b/Guests/RTR-03.ps1 index 0433fc3..15580ac 100644 --- a/Guests/RTR-03.ps1 +++ b/Guests/RTR-03.ps1 @@ -50,14 +50,10 @@ foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; ### Install Routing and necessary linked roles -echo "Installing Routing and necessary linked roles" -Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools - -### Install VPN (?) - -echo "Install Vpn" +echo "installing VPN routing role" Install-remoteAccess -VpnType Routingonly -#End +set-service RemoteAccess -StartupType Automatic +Start-Service RemoteAccess ### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes ###