Windows General Administration Tips for day to day task. These are commands I use in day to day operation to get quick info and control our domain users. Most of commands may work in domain environment, but you can modify it to work with work-group environment if you know the remote PC id password.
Most of pstools commands require remote registry on remote PC must be running. you can start that service on remote PC by using following command.
TIP: When the Utilities Won’t Connect Because of Remote Registry
psservice \\remotepc start RemoteRegistry
Inquire Remote PC Hardware Info like Board / serial and OS Architecture 32bit/64bit.
– To get Board number of local pc
wmic baseboard get product,Manufacturer,version,serialnumber
– To get Board number of remote pc
wmic /node:"remotepc" baseboard get product,Manufacturer,version,serialnumber
– To get remote PC Architecture like 32bit or 64bit
wmic /node:"remotepc" os get osarchitecture
# PSLOGGEDON COMMANDS
To check which user is logged on remote PC,
# PSEXEC COMMANDS
– To execute any command on remote PC like
psexec \\remtotepc ipconfig
– To open COMMAND prompt of remote user
psexec \\remotepc cmd
-Interacting with the Logged On User on the Remote PC
psexec \\remotepc -d -i notepad
# PSINFO COMMANDS
Getting general info of OS, uptime etc with disk info as well
psinfo -d \\remotepc
# PSLIST COMMANDS
To get running process list from remote PC.
# PSKILL COMMANDS
– Kill any running program on remote PC.
pskill \\remotepc notepad
# PSSHUTDOWN COMMANDS
– To shutdown remote PC
psshutdown \\remotepc -d
# WINDOWS BUILTIN SHUTDOWN TOOL
Its recommended to use windows builtin shutdown utility/tool
– To Shutdown local PC in 30 seconds with popup message.
shutdown /s /t 30 /c "Shutdown by Admin"
– To restart Local PC in 30 seconds
shutdown /r /t 30 /c "Restart by Admin"
– To shutdown REMOTE PC in 30 seconds with a message
shutdown /m \\remotepc /s /t 30 /c "Shutdown by Admin"
– To restart REMOTE PC in 30 seconds
shutdown /m \\remotepc /r /t 30 /c "Shutdown by Admin"
# WINDOWS TASK LIST / KILL TOOLS
# WINDOWS BUILTIN TASK LIST TOOL (to view remote pc running process task)
tasklist /S REMOTEPC
– To kill remote PC task by name
taskkill /S REMOTEPCNAME /F /IM notepad.exe
# WINDOWS BUILTIN TASKKILL TOOL (to kill any task)
– to kill local task by name with force
taskkill /IM /F notepad.exe
– to kill local running task by PID
taskkill /PID 1234 /T
More will be added later.
Some more reference for using PSTOOLS in some automated ways are