oDgo Posted February 24, 2009 Posted February 24, 2009 (edited) Hellomaybe you`ll find this useful:@cls@echo [sys variables]setecho rem ::Services>cu.txt(@echo rem net stop " ")>>cu.txt@sc query|find /i "seRVicE_nAMe">>cu.txtstart cu.txtpause>nulexitrem;)oDgoGives variable view & exports services of computer to prepared file to make an cmd file from for shuting down services on computer. Actually this is for local run. I`m using it for review&temporary shutdown services on computer. To use it with psexec http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx you`ll need to think of where ur saving your file containing services on remote computer. Adding some prepared remote directory looks like easy way to handle with it. @clsnet use z: \\server\dir /user:temporaryluser passwdecho rem ::Services>Z:\cu.txt(@echo rem net stop " ")>>z:\cu.txt@sc query|find /i "seRVicE_nAMe">>z:\cu.txtpause>nulnet use z: /dexitrem;)oDgoThis is good to b sent by psexec to run. You`ll find services running on remote computer saved in \\server\dir\cu.txt . you can also change cu.txt to %computername% variable if u would like to use it on more computers over net. Edited February 25, 2009 by Yzöwl All double ampersands replaced by line returns
Yzöwl Posted February 25, 2009 Posted February 25, 2009 Now I've finished making your post readable and in a more appropriate topic etc., I'd like to ask if you could break down your series of commands explaining what exactly it is they do!
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