Syed Jahanzaib Personal Blog to Share Knowledge !

January 15, 2016

[Personnel Reference] Windows General Admin Tips

Filed under: Microsoft Related — Tags: , , , — Syed Jahanzaib / Pinochio~:) @ 11:31 AM

remote


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.

Also I am using PSTOOLS to accompany the tasks. You should download pstools and extract them in c:\pstools folder.

https://download.sysinternals.com/files/pstools.zip

 


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

2- hardware


PSTOOLS RELATED

# PSLOGGEDON COMMANDS

To check which user is logged on remote PC,

psloggedon \\remotepc

# 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

1- psinfo


 

# PSLIST COMMANDS

To get running process list from remote PC.

pslist \\remotepc

# 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

tasklist

– 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

https://aacable.wordpress.com/tag/howto-install-snmp-in-windows-7-remotely/

https://aacable.wordpress.com/2015/11/05/adding-external-ntp-server-in-domain-controller-short-notes/


 

Regard’s
Syed Jahanzaib

Create a free website or blog at WordPress.com.