Command Detail - P
Last updated
Last updated
The PowerShell equivalent of the ps
command is:
You can use get-process
to get information about other computers:
You can use select
and where
to 'slice and dice' the information.
As with ps
, the get-process
command has many options. This section of the e-book will be expanded over the next few months but, to start with, these are some of the ps
examples from the Linux man
page.
By default get-process
shows all of the processes on the current PC or server
If you wanted to just see details of your process you could do this:
$PID
is an 'automatic variable' which contains the PID (process identifier) of the current process
For a list of automatic variables see
There is no PowerShell equivalent to the Unix ps -eJH
, because as I understand it Windows processes aren't part of a process tree.
I think this shows information about the processes threads:
To show your current location in Powershell:
...or there are aliases gl
and pwd
.
There is also a built-in variable