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 "____________________________________________________"
@echo "| Remote Print cancel           V1.0 by Amir |"
@echo "|                                                  |"
@echo "|To finnish session, type 'EXIT'!                  |"
@echo "|__________________________________________________|"
@echo ""
@echo ""
@echo off
set /p input=Type input:
c:\pstools\psexec.exe -s \\%input% -c \\YOURPATH\CleanSpooler.cmd -u YOUR USERNAME -p YOUR PASSWORD
Save script above like: RemotePrintCancel.cmd
Download psexec tool from Sysinternals.

Clean spooler script is:

net stop spooler
del %systemroot%\system32\spool\printers\*.shd
del %systemroot%\system32\spool\printers\*.spl
net start spooler
Save 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.

Share this

Related Posts