Question about Windows Services
On Windows 2003 or windows 2000, is there a command I can run to display Services for a particular server or services from the command?for example...if i want to hit ServerA and display a particular service how can i do that function via command line?thanks
April 12th, 2007 12:26am

Hi Jigar, Use the SC command. Like: C:\>sc \\ServerA Query To put those results in a file, pipe the text to a file with the pipe character > Like: C:\>sc\\ServerA Query > C:\ResultsForServerA.txt Cheers, Ring0 http://MyMessageTaker.com
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2007 3:14am

Thanks for the info..how do use a string..like %SQLServer% in sc \\servername Query <string> thanks!
April 16th, 2007 11:55pm

Hi Jigar, I'm not sure what you are wanting to do. If you want to query the MS SQL Server Service then the <string> needs to be the"Service Name" of the service - in the case of SQL2005 its: MSSQLSERVER So, sc \\servername Query MSSQLSERVER will give you the status of SQL Server on machine servername. %SQLServer% is usually only used for environment variables. If you would like to query many servers then a batch file or VBS scrpt is the way to go. I could write you one if you give me some idea of what you are trying to do. Cheers, Ring0 http://MyMessageTaker.com
Free Windows Admin Tool Kit Click here and download it now
April 17th, 2007 3:23pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics