Skip to content

Instantly share code, notes, and snippets.

@bohack
Created October 24, 2018 17:13
Show Gist options
  • Save bohack/81ffa49c8186dd37d4a5feb1c71b0464 to your computer and use it in GitHub Desktop.
Save bohack/81ffa49c8186dd37d4a5feb1c71b0464 to your computer and use it in GitHub Desktop.
Remote GPO Pusher for VDI Problem
@ECHO OFF
REM Bohack
REM 10/08/18
REM Remote GPO Pusher for VDI Problem
IF {%1}=={} (ECHO. && ECHO %0 computername && ECHO. && GOTO :END)
WMIC /node:%1 process call create "CMD.EXE /C GPUPDATE.EXE"
TIMEOUT 15 /NOBREAK
PSKILL \\%1 vmware-view
IF %ERRORLEVEL% EQU 9009 (COLOR 47 && ECHO. && ECHO ERROR! - Please install PStools from Microsoft. && ECHO.)
:END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment