Posted On May 22, 2020

How to Enable GPUPDATE When Connected via OpenVPN Client

kimconnect 0 comments
blog.KimConnect.com >> Codes , Networking >> How to Enable GPUPDATE When Connected via OpenVPN Client
// Explanation: to prevent locking of processes, we set a proxy batch file (on_connect.bat) to call gpupdate (gpupdate.bat)
// add this line to the ovpn-File:
up 'C:\\Users\\%USERNAME%\\OpenVPN\\config\\on_connect.bat'

// on_connect.bat:
start .\gpupdate.bat

// gpupdate.bat:
:gpupdate
echo trigger gpupdate ...
c:\windows\system32\gpupdate.exe /force
if errorlevel 0 goto exit
goto gpupdate
:exit

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Common Windows Ports and Services

Port Protocol Application protocol System service name n/a GRE GRE (IP protocol 47) Routing and…

PowerShell: Find Windows RDS Roles and Their Licensing Servers

# Get TS Licensing Servers (Enterprise or AD Registered) $termLicenseServers=Get-ADGroupMember -Identity "Terminal Server License Servers"…

PowerShell: Scan for Available or Unavailable IPs

This function is a demonstration of multi-tasking using PowerShell. The program will ping multiple targets…