Script for remote cancel all print job
This is simple scripts for cancel all print job with psexec tool on remote computer without log in on remote computer.
You must be local administrator on remote mashine.
@echo "____________________________________________________"Save script above like: RemotePrintCancel.cmd
@echo "| Remote Print cancel V1.0 by Amir |"
@echo "| |"
@echo "|To finnish session, type 'EXIT'! |"
@echo "|__________________________________________________|"
@echo ""
@echo ""
@echo "INPUT REMOTE COMPUTER NAME"
@echo off
set /p input=Type input:
c:\pstools\psexec.exe -s \\%input% -c \\YOURPATH\CleanSpooler.cmd -u YOUR USERNAME -p YOUR PASSWORD
pause
Download psexec tool from Sysinternals.
Clean spooler script is:
net stop spoolerSave above script as CleanSpooler.cmd and copy on some shared location(YOURPATH) where all users have access. Thats it just run first script with corect path for second script.
del %systemroot%\system32\spool\printers\*.shd
del %systemroot%\system32\spool\printers\*.spl
net start spooler
Comments
Post a Comment