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

Python Language Condensed

Strings # declare variable stringsomeString = "Hoy Matey"# Yank positional 1 to 3 within stringyank…

PowerShell Script to Clean Up Files Older than X Days

$purgePeriod = 30;$folders = '\\FILSERVER01\ORDERS\BACKUP','C:\SFTP_BACKUP';Get-ChildItem -path $folders | where {$_.Lastwritetime -lt (date).adddays(-$purgePeriod)} | remove-item;

PowerShell: Measure File Copying Time

The scripty: $sourcesAndDestinations=@("C:\Users\kimconnect\Desktop\test\test1 C:\Users\kimconnect\Desktop\test\test2","C:\Users\kimconnect\Desktop\test\test2 C:\Users\kimconnect\Desktop\test\test3")$testPath="C:\Users\kimconnect\Desktop\test\test1"$switchesMirrorDirectories="/MIR /SEC /W:3 /FFT "$dateStamp = Get-Date -Format "yyyy-MM-dd-hh-mm"$currentPath=(Get-Item -Path ".\").FullName$log="/LOG+:$currentPath\robocopy-log-$dateStamp.txt"function…