Additional Script Updates
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Check if the VPN profile is configured
|
||||
$vpnProfile = Get-VpnConnection -Name "CorporateVPN" -ErrorAction SilentlyContinue
|
||||
if ($vpnProfile) {
|
||||
Write-Output "VPN is configured"
|
||||
exit 0
|
||||
} else {
|
||||
Write-Output "VPN is not configured"
|
||||
exit 1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# Configure the VPN profile
|
||||
Add-VpnConnection -Name "CorporateVPN" -ServerAddress "vpn.corporate.com" -TunnelType "L2tp" -AuthenticationMethod "Eap" -EncryptionLevel "Required" -RememberCredential
|
||||
Write-Output "VPN configured"
|
||||
Reference in New Issue
Block a user