virtualcenter


Our IT journal

Keep-alive script for Windows VPN connections

$ServerName = “192.168.40.1” ##### Script Starts Here ###### foreach ($Server in $ServerName) { if (test-Connection -ComputerName $Server -Count 2 -Quiet ) { write-Host “$Server is alive and Pinging ” -ForegroundColor Green } else { Write-Host “$Server is down.” Write-Host “Disconnecting…” rasdial.exe “Woodside” /DISCONNECT Write-Host “Connecting…” rasdial.exe “Woodside” user vpnpassword } }  


L2TP IPSec VPN fails on Windows – Enable UDP encapsulation

Open up regedit and go to the following location HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent Create a DWORD32 entry, name it AssumeUDPEncapsulationContextOnSendRule and enter a value of 2. Save and Reboot.   You can optionally execute this command on an elevated prompt. Also reboot to apply. REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f


Configuring VPN profiles via CMAK

Sometimes we have to roll out our VPN, and manually creating a profile or asking a user to execute a Powershell script it’s not something we do every day. Instead, Microsoft gave us CMAK – or Connection Manager Administrator Kit, a Windows Feature that can be installed on your Windows Workstation or Server via Windows Features:   Launch cmak, and … Read More