powershell-training-material

Chapter 2 | Look inside a Cmd-Let

image

Get-Help Get-Help -Examples

image

Get-Help Get-Process -Examples

NAME
    Get-Process    
SYNOPSIS
    Gets the processes that are running on the local computer or a remote computer.    
    -------------------------- EXAMPLE 1 --------------------------    
    C:\PS>Get-Process  
    
    Description
    -----------
    This command gets a list of all of the running processes running on the local computer. For a definition of each co
    lumn, see the "Additional Notes" section of the Help topic for Get-Help.    
    
    -------------------------- EXAMPLE 2 --------------------------    
    C:\PS>Get-Process winword, explorer | format-list *    
    
    Description
    -----------
    This command gets all available data about the Winword and Explorer processes on the computer. It uses the Name par
    ameter to specify the processes, but it omits the optional parameter name. The pipeline operator (|) passes the dat
    a to the Format-List cmdlet, which displays all available properties (*) of the Winword and Explorer process object
    s.
    
    You can also identify the processes by their process IDs. For example, "get-process -id 664, 2060".    
    
    -------------------------- EXAMPLE 3 --------------------------    
    C:\PS>get-process | where-object {$_.WorkingSet -gt 20000000}   
    
    Description
    -----------
    This command gets all processes that have a working set greater than 20 MB. It uses the Get-Process cmdlet to get a
        

image