Created
October 24, 2018 17:13
-
-
Save bohack/81ffa49c8186dd37d4a5feb1c71b0464 to your computer and use it in GitHub Desktop.
Remote GPO Pusher for VDI Problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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