What commands do you find useful administering Windows 200x remotely?

Ever since someone recommended psExec tool for Windows, I feel it is really handy sometimes when I can not remote desktop onto the target machine. But I do not know many commands out there. Can everyone share any commands that you use for a certain task? In the end, we may have a list of common commands for a system administrator. When the GUI is not available, command is almost the last chance. To start off the discussion, I prepare a few questions, though that's not my only purpose.
Context: commands to achieve the following tasks:
1. How to check what services are installed? So it will be possible to stop/start it?
2. How to create a local user account?
3. How to add a domain user into local administrator group?
4. Any links for administering windows remotely via CLI are appreciated.
Who is Participating?
Lee W, MVPTechnology and Business Process AdvisorCommented:
1.  SC - as in Service Control.
2.  NET USER /ADD ... (reference the help)
3.  I believe NET GROUP groupname USERNAME /ADD - but you might have to test this
4.  Two sites:

Both are great for learning batch commands and usage.  With PSEXEC, you don't have to worry about commands that work specifically on remote systems.

Of course, WMI is also quite powerful.
richtreeAuthor Commented:
Hi Ieew:
Can you also post more on WMI?
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Brian PiercePhotographerCommented:
Malli BoppeCommented:
You don't need any commands. open the computer mgt on your PC.Right click on cmp mgmt and click connect to computer, specify the name or browse for the computer you want to manage .enter the logon cerdentials.This would let you manage the remote computer mgt which would let you restart the computer remotely check the services and restart them.add a local user.You can do all the things that you want to.
only command you need to taskkill
Open a command prompt and use
tasklist /s remotemachine
to get the name of the process or the PID you want to kill (if you don't know it yet), then use
taskkill /s remotemachine /im processname
(or taskkill /s remotemachine /pid processPID if you want to kill "per PID")

Also, you mentioned PSEXEC.....

Just to add, the easiest thing I like to do with PSEXEC is opena  remote comman shell...Then you will have ALL of your local commands there, that you would normally use on a local machine, and can do almost anything.....

psexec \\pcname cmd.exe
richtreeAuthor Commented:
Yes, I like to know some commands that are useful for administering the local machines. Thanks.
Can manage almost any aspect of the network configuration....

To get detailed info on security for a file or folder...

For changing attributes at the command line...

fsutil dirty query C:
Checks to see if the C drive is flagged as DIRTY, and needs to be fixed...

set.exe gives you great information for troubleshooting, kind of a general summary. Ideal in a Roaming Profile environment.........

Again, local machine management....Map drives, manage localgroups, see stats for connections....net /? will show you more items...

richtreeAuthor Commented:
thanks a lot.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.