• Narrow screen resolution
  • Wide screen resolution
  • Increase font size
  • Decrease font size
  • Default font size
  • default color
  • red color
© Diana Scherff, Amas-Veritas.com

Welcome to Amas Veritas [dot] com

Updates: Media (lyrics) has a new layout. I could never figure out how to lay it out, but it's easier to navigate now. I'm still working on a better duplicate Mamblog mod. I'm trying to make submittions easier but the poetry form died for some reason. Quizzes are also on their way from the old site. Joomla content isn't very code friendly so I'm having to rewrite old code. You can still click on News > AH v21 > Screen if you wish to use the quizzes.
 
Home arrow Tools arrow Software arrow Get-Process [gps]
Get-Process [gps] Print E-mail
Written by Diana, on 04-09-2007 02:21
Views 130    
Favoured None

PS C:\Users\Admin> help gps -full

NAME
    Get-Process

SYNOPSIS
    Gets the processes that are running on the local computer.

SYNTAX
    Get-Process [[-name] <string[]>] [<CommonParameters>]

    Get-Process -id <Int32[]> [<CommonParameters>]

    Get-Process -inputObject <Process[]> [<CommonParameters>]


DETAILED DESCRIPTION
    The Get-Process cmdlet retrieves a process object for each process. Without parameters, "Get-Process" gets all of the processes on the computer, as though you typed "Get-Process *". You can also identify a particular process by process name or process ID (PID), or pass a process object through the pipeline to Get-Process. For Get-Process, the default method is by process name. For Stop-Process, the default method is by process ID.


PARAMETERS
    -name <string[]>
        Specifies one or more processes by process name. You can type multiple process names (separated by commas) or use wildcard characters. The parameter name ("-Name") is optional.

        Required?                    false
        Position?                    1
        Default value                Null
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  true

    -inputObject <Process[]>
        Accepts a process object as input to the cmdlet. Enter a variable that contains the objects or type a command or expression that gets the objects.

        Required?                    true
        Position?                    named
        Default value                Null
        Accept pipeline input?       true (ByValue)
        Accept wildcard characters?  false

    -id <Int32[]>
        Specifies one or more processes by process ID (PID). To specify multiple IDs, use commas to separate the IDs. To find the PID of a process, type "get-process".

        Required?                    true
        Position?                    named
        Default value                Null
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  false

    <CommonParameters>
        This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".

INPUT TYPE
    PSObjects with the "ProcessName" or "Id" property specified, or all processes if neither is specified.


RETURN TYPE
    Process Object(s).
    For details, see the .NET framework documentation of the System.Diagnostics.Process class. These objects are sorted by ProcessName, and within ProcessName, by ID.


NOTES


        For more information, type "Get-Help Get-Process -detailed". For technical information, type "Get-Help Get-Process -full".

        When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".

        You cannot use the -Name, -ID, and -InputObject parameters in the same command.

        You can also refer to Get-Process by its built-in aliases, "ps" and "gps". For more information, see About_Alias.

        You can also use the properties and methods of the WMI Win32_Process object in Windows PowerShell. For information, see Get-WmiObject and the Windows Management Instrument SDK.

        The default display of a process is a table that includes the following columns:

        -- Handles: The number of handles that the process has opened.

        -- NPM(K): The amount of non-paged memory that the process is using, in kilobytes.

        -- PM(K): The amount of pageable memory that the process is using, in kilobytes.

        -- WS(K): The size of the working set of the process, in kilobytes. The working set consists of the pages of memory that were recently referenced by the process.

        -- VM(M): The amount of virtual memory that the process is using, in megabytes. Virtual memory includes storage in the paging files on disk.

        -- CPU(s): The amount of processor time that the process has used on all processors, in seconds.

        -- ID: The process ID (PID) of the process.

        -- ProcessName: The name of the process.

        For explanations of the concepts related to processes, use the Glossary in Help and Support Center and help for Task Manager.

        You can also use the built-in alternate views of the processes available with Format-Table, such as "StartTime" and "Priority", and you can design your own views. For more information, type "Get-Help Format-Table -detailed".


    ----------------- EXAMPLE 1 -----------------

    C:\PS>Get-Process


    This command gets a list of all of the running processes running on the local computer. For a definition of each column, see Additional Notes in "Get-Help Get-Process -Full."





    ----------------- EXAMPLE 2 -----------------

    C:\PS>Get-Process winword, explorer | format-list *


    This command gets all available data about the Winword and Explorer processes on the computer. It uses the Name parameter to specify the processes, but it omits the optional parameter name. The pipeline operator (|) passes the data to the Format-List cmdlet, which displays all available properties (*) of nhe Winword and Explorer process objects.

    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}


    This command gets all processes that have a working set greater than 20 MB. It uses the Get-Process cmdlet to get all running processes. The pipeline operator (|) passes the process objects to the Where-Object cmdlet, which selects only the object with a value greater than 20,000,000 bytes for the WorkingSet property.

    WorkingSet is one of many properties of process objects. To see all of the properties, type "Get-Process | Get-Member". By default, the values of all amount properties are in bytes, even though the default display lists them in kilobytes and megabytes.





    ----------------- EXAMPLE 4 -----------------

    C:\PS>$a = get-process

    get-process -inputobject $a | format-table -view priority


    These commands list the processes on the computer grouped by priority. The first command gets all of the processes on the computer and stores them in the $a variable. The second command uses the InputObject parameter to pass the process objects stored in $a to Get-Process. The pipeline operator passes the objects to the Format-Table cmdlet, which formats the processes by using the "Priority" view defined in the PS1XML format files in the Windows PowerShell home directory ($pshome).






RELATED LINKS
    Stop-Process


Last update: 04-09-2007 02:21

Published in : Tools, Windows PowerShell

Users' Comments (0) RSS feed comment

No comment posted

Add your comment



mXcomment 1.0.4 © 2007-2009 - visualclinic.fr
License Creative Commons - Some rights reserved
 
< Prev   Next >




Double click any word on this page for a definition.
Using Firefox? Enable definitions by downloading the extension.
Sorry, this feature does not currently work in Opera or Safari.

No Users Online

Statistics

OS: FreeBSD
PHP: 5.2.1
MySQL: 4.1.21-log
Time: 22:13
Caching: Disabled
GZIP: Disabled
Members: 36
News: 2448
Web Links: 39
Visitors: 1443590

Syndicate

Login

Particls