Cool stuff you can do with PsTools with Examples

Posted by SysAdmin Tools on

PSTOOLS General Arguments

These normally work with all the PsTools

  • @file - runs the commands on all the computers in the file
  • \\computername - Runs the command on the remote computer
  • -u - Optional username for the computer
  • -p - Optional password for the computer

 

DONT FORGET TO CHECK OUT OUR AWESOME TOOLS WHEN YOU ARE DONE READING THE ARTICLE 






PsExec

Description : Run applications with various properties

 

  • Run an application as SYSTEM in the console session

PsExec -i -s application.exe

  • Run an application in a specific session

PsExec -i <sessionID> application.exe

  • Other Uses

    • Run applications as SYSTEM to gain access to secured content. This works especially well with applications like SQL Server Management Studio to access SYSTEM secured databases. 

 

PsInfo

Description : Gathers Application, Hotfix and Disk info from local or remote computers

 

  • List hotfixes

PsInfo -h

  • List installed applications

PsInfo -s

  • Show disk info

PsInfo -d

  • Show Uptime

PsInfo -h -d | find "Uptime:"

You can run the find pipe on all these strings 

 

PsPing

Description : ICMP, TCP, Latency and Bandwidth Tests

 

ICMP

  • Ping Latency : Ping Super Fast or Slow

PsPing -i <latency in ms>  <target>

  • Ping Count

PsPing -n 10 <target>

  • No Output

PsPing -q <target>

  • Continuous Ping

PsPing -t <target> 

 

TCP

  • TCP / UDP Ping

PsPing <target>:<port>
Example : PsPing 8.8.8.8:53

 

LATENCY

  • Server <> Client Latency Check

  • -s Server listening address and port

  • Use -f to open the source port in the firewall

  • -u to use UDP (Default is TCP)

Server : PsPing -f -s <ListenIP>:<ListenPort>
Client : PsPing <Server>:<Port>

 

BANDWIDTH

  • Server <> Client Bandwidth Check

  • -b Bandwidth check option

  • -s Server listening address and port

  • Use -f to open the source port in the firewall

  • -u to use UDP (Default is TCP)

Server : PsPing -f <ListenIP>:<ListenPort>
Client :
PsPing -b <target>:<port>

 





PsList

Description : Shows Process Info

 

  • Run Task Manager in Command Line

PsList -s

  • Show Process info about Process starting with *

  • -e Math the process name exactly

PsList exp 
*this would include explorer

 

PsPasswd

Description : Changes Local Passwords

 

  • Change password for specified username

PsPassword Username NewPassword

  • Other Uses

    • Change local passwords on many machines at once. 

 

PsSuspend

Description : Suspend a process instead of killing it

 

  • Suspend a process by name

PsSuspend <process name>

  • Suspend a pricess by PID

PsSuspend <PID>

  • Resume the process

PsSuspend -r <Process>

 

Source

https://docs.microsoft.com/en-us/sysinternals/downloads/pstools

 
CLICK BELOW TO CHECK OUT OUR AWESOME TOOLS
THAT CAN MAKE YOUR LIFE EASIER,
JUST LIKE THESE COMMANDS

 

 

 

 

 


Share this post



← Older Post


Leave a comment

Please note, comments must be approved before they are published.