enjay Posted February 26, 2008 Posted February 26, 2008 Is it possible to stop services on a remote computer (via a script or batch command), or can that only be done locally?
sidewinder Posted February 26, 2008 Posted February 26, 2008 netsvc should do it. I think its on the resource kit 1
enjay Posted February 26, 2008 Author Posted February 26, 2008 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...
Jona Posted February 26, 2008 Posted February 26, 2008 Maybe here: http://www.petri.co.il/download_free_reskit_tools.htm ?? File link: http://www.dynawell.com/reskit/microsoft/win2000/netsvc.zip or http://www.dynawell.com/support/Reskit/download/w2knetsvc.asp
mac_shinobi Posted February 26, 2008 Posted February 26, 2008 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 : http://www.computerperformance.co.uk/vbscript/wmi_services.htm If that does not work then you may need a bit more in the script to provide admin credentials ( If so post back )
OutToLunch Posted February 26, 2008 Posted February 26, 2008 Good old Sysinternals tools also work - in this case psservice, although I often forget it exists and do psexec \\pcname net stop "servicename" http://technet.microsoft.com/en-us/sysinternals/bb897542.aspx 1
Valentine Posted February 26, 2008 Posted February 26, 2008 sc \\pcname stop "servicename" Think this should do it?
enjay Posted February 26, 2008 Author Posted February 26, 2008 Good old Sysinternals tools also work - in this case psservice, although I often forget it exists and do psexec \\pcname net stop "servicename" http://technet.microsoft.com/en-us/sysinternals/bb897542.aspx Thanks OutToLunch - that does exactly what I want, and is nice and quick to install.
enjay Posted February 26, 2008 Author Posted February 26, 2008 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?
m2d2 Posted February 26, 2008 Posted February 26, 2008 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? Unless there are depencies (i.e. lots of services depending on one service) then probably not.
Michael Posted February 26, 2008 Posted February 26, 2008 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!
enjay Posted February 27, 2008 Author Posted February 27, 2008 Michael, 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.
Ryan Posted February 27, 2008 Posted February 27, 2008 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?
enjay Posted February 27, 2008 Author Posted February 27, 2008 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? I just put them on a share on the network and run them from a UNC path, which worked fine.
Ryan Posted February 27, 2008 Posted February 27, 2008 I'll only ever be running them from this PC. I'll try chucking 'em in Win32 dir (Edit: Mong - i obv. mean 'System32')
Nick_Parker Posted April 4, 2010 Posted April 4, 2010 I've just tried to use pslist on a Windows 7 machine and it doesn't work anymore
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now