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 "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
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.


Comments

Popular posts from this blog

Cisco VPN client 5.0.07.0410 and Windows 10 Problems (Solved)

Find hard disk bad sectors (error 7) if exist on remote computers - Script 2017

How to remove Microsoft edge tab from Internet explorer 11 - Windows 10 15063