AutomatedLab/AutomatedLab

[New Feature]: AutomatedLab Routing role support for SSTP and IKEv2 protocol support natively

Open

#1813 aperta il 5 mar 2026

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)PowerShell (384 fork)batch import
EnhancementHelp Wanted

Metriche repository

Star
 (2202 star)
Metriche merge PR
 (Merge medio 8h 26m) (1 PR mergiata in 30 g)

Descrizione

Description

Server 2025, when the Routing role is added, installs the RRAS role on the guest OS. The routing role currently defined, is compatible with Server 2022 and earlier that use the PPTP and L2TP protocols natively by default.

In Server 2025, these protocols are disabled by default and have been replaced by SSTP and IKEv2 instead.

This request is to build some logic into the routing role deployment that determines the guest OS version and adds the support for the appropriate protocols based on that version.

Something like: if ((Get-CimInstance -ClassName CIM_OperatingSystem).Caption -Like "Server 2025") {

Install-WindowsFeature -Name RemoteAccess, DirectAccess-VPN, Routing -IncludeManagementTools -Verbose
$network = Get-LabVirtualNetwork -ErrorAction SilentlyContinue

$Internet = $network | Where-Object {$_.Name -like "External*"}
$Internal = $network | Where-Object {$_.Name -like "$labName*"}

Install-RemoteAccess -VpnType Vpn -DeployNat -InternetInterface $Internet -InternalInterface $Internal
Set-VpnServerConfiguration -IPAddressRange "192.168.0.50", "192.168.0.100"
Add-NetNat -Name "RRAS_NAT" -InternalIPInterfaceAddressPrefix "10.0.0.0/23"
Restart-Service RemoteAccess -Force

} else { "Install routing role as per original role configuration." }

Guida contributor