This post i am documenting some of powershell quick reference scripts
Get Members of a command
c:> get-service | gm
Get-help CMD-NAME
Example:
c:> get-help start-service
Get-process -name "Name"
Example
c:> get-process -name "outlook"
Get Process - physical directory path
PS C:\Windows\system32> get-process outlook | dir
Directory: C:\Program Files (x86)\Microsoft Office\Office14
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 3/31/2011 4:08 PM 15933792 OUTLOOK.EXE
c:> get-service -filter * | select -Property name, @{name='ComputerName',expression={$_.name}_
Get Members of a command
c:> get-service | gm
Get-help CMD-NAME
Example:
c:> get-help start-service
Get-process -name "Name"
Example
c:> get-process -name "outlook"
Get Process - physical directory path
PS C:\Windows\system32> get-process outlook | dir
Directory: C:\Program Files (x86)\Microsoft Office\Office14
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 3/31/2011 4:08 PM 15933792 OUTLOOK.EXE
c:> get-service -filter * | select -Property name, @{name='ComputerName',expression={$_.name}_