# Script to restart print spooler



## Akumos (Jan 7, 2011)

Hi

I'm trying to get a script to restart the print spooler on a server from a slient so I don't have to remote in and restart it manually each time. Is this possible?

I have the restart code, just need to point it to a server.


```
@echo off
net stop spooler
net start spooler
exit
```

Any ideas?

Thanks


----------



## Kreij (Jan 7, 2011)

sc \\computer stop "service name"
sc \\computer start "service name"

sc.exe is in the system32 and/or SysWOW64 folders.


----------



## ktr (Jan 7, 2011)

Read up on this: http://technet.microsoft.com/en-us/library/cc725744(WS.10).aspx


----------



## Akumos (Jan 10, 2011)

Thanks both... 

Kreij, your reply worked perfectly as always!! Thanks!


----------

