This any use?
Is it possible to stop services on a remote computer (via a script or batch command), or can that only be done locally?
netsvc should do it. I think its on the resource kit
Yes, netsvc seems to do what I want, thanks - any offers where I can download it from? If I ever had a Win2K Resource CD, I've long since lost it...
you can use computer management I would of thought to do that - right click my computer ( provided you are logged in as domain admin ) and go to manage and then the services section.
To do this on a remote machine , just right click where it says this computer in side of manage my computer and click on connect to.
Then navigate through there services and restart or stop or w/e
If you need a vbscript to do it, look at this :
If that does not work then you may need a bit more in the script to provide admin credentials ( If so post back )
sc \\pcname stop "servicename"
Think this should do it?
The next trick is whether it is possible to stop all SQL services in one go, or whether I have to stop each one individually. Any offers?
Start > Run > MMC > Add Snap-in > Services > Specify Workstation
This works with any 2000/XP/2003 workstation/server. I'm reluctant to say Vista as MS appear to have changed everything!
That does work, and with Vista too!, but I was after an automated way of doing this.
I'm looking to stop various SQL services ahead of the backup and restart them afterwards - obviously this is easy enough with scheduled tasks, but I wanted the neatness of having them in one place and also the time-efficiency of only having them stopped for as short a time as necessary.
PsTools are awesome Just had a little play with them, very nice.
It says you should put the files in the "Executable path", is that the win32 dir?
There are currently 1 users browsing this thread. (0 members and 1 guests)