Condividi tramite


Get-Job

Ottiene i processi in background di PowerShell in esecuzione nella sessione corrente.

Sintassi

Get-Job
   [-IncludeChildJob]
   [-ChildJobState <JobState>]
   [-HasMoreData <Boolean>]
   [-Before <DateTime>]
   [-After <DateTime>]
   [-Newest <Int32>]
   [[-Id] <Int32[]>]
   [<CommonParameters>]
Get-Job
   [-IncludeChildJob]
   [-ChildJobState <JobState>]
   [-HasMoreData <Boolean>]
   [-Before <DateTime>]
   [-After <DateTime>]
   [-Newest <Int32>]
   [-State] <JobState>
   [<CommonParameters>]
Get-Job
   [-IncludeChildJob]
   [-ChildJobState <JobState>]
   [-HasMoreData <Boolean>]
   [-Before <DateTime>]
   [-After <DateTime>]
   [-Newest <Int32>]
   [-Command <String[]>]
   [<CommonParameters>]
Get-Job
   [-IncludeChildJob]
   [-ChildJobState <JobState>]
   [-HasMoreData <Boolean>]
   [-Before <DateTime>]
   [-After <DateTime>]
   [-Newest <Int32>]
   [-InstanceId] <Guid[]>
   [<CommonParameters>]
Get-Job
   [-IncludeChildJob]
   [-ChildJobState <JobState>]
   [-HasMoreData <Boolean>]
   [-Before <DateTime>]
   [-After <DateTime>]
   [-Newest <Int32>]
   [-Name] <String[]>
   [<CommonParameters>]
Get-Job
   [-Filter] <Hashtable>
   [<CommonParameters>]

Descrizione

Il cmdlet Get-Job ottiene oggetti che rappresentano i processi in background avviati nella sessione corrente. È possibile usare Get-Job per ottenere i processi avviati usando il cmdlet Start-Job oppure usando il parametro AsJob di qualsiasi cmdlet.

Senza parametri, un comando Get-Job ottiene tutti i processi nella sessione corrente. È possibile usare i parametri di Get-Job per ottenere specifici processi.

L'oggetto processo restituito da Get-Job contiene informazioni utili sul processo, ma non i relativi risultati. Per ottenere i risultati, usare il cmdlet Receive-Job.

Un processo in background Windows PowerShell è un comando eseguito in background senza interagire con la sessione corrente. In genere, si usa un processo in background per eseguire un comando complesso che richiede molto tempo per terminare. Per altre informazioni sui processi in background in Windows PowerShell, vedere about_Jobs.

A partire da Windows PowerShell 3.0, il cmdlet Get-Job ottiene anche tipi di processo personalizzati, ad esempio processi del flusso di lavoro e istanze di processi pianificati. Per trovare il tipo di un processo, usare la relativa proprietà PSJobTypeName.

Per abilitare Get-Job per ottenere un tipo di processo personalizzato, importare il modulo che supporta il tipo di processo personalizzato nella sessione prima di eseguire un comando Get-Job , usando il cmdlet Import-Module o usando o ottenendo un cmdlet nel modulo. Per informazioni su un tipo di processo personalizzato particolare, vedere la documentazione relativa alla funzionalità del tipo di processo personalizzato.

Esempio

Esempio 1: Avviare tutti i processi in background nella sessione corrente

PS C:\> Get-Job

Questo comando ottiene tutti i processi in background avviati nella sessione corrente. Non include i processi creati in altre sessioni, neanche se vengono eseguiti nel computer locale.

Esempio 2: Arrestare un processo usando un ID istanza

The first command uses the **Get-Job** cmdlet to get a job. It uses the *Name* parameter to identify the job. The command stores the job object that **Get-Job** returns in the $j variable. In this example, there is only one job with the specified name.
PS C:\> $j = Get-Job -Name Job1

The second command gets the **InstanceId** property of the object in the $j variable and stores it in the $ID variable.
PS C:\> $ID = $j.InstanceID

The third command displays the value of the $ID variable.
PS C:\> $ID

Guid
----
03c3232e-1d23-453b-a6f4-ed73c9e29d55

The fourth command uses Stop-Job cmdlet to stop the job. It uses the *InstanceId* parameter to identify the job and $ID variable to represent the instance ID of the job.
PS C:\> Stop-Job -InstanceId $ID

Questi comandi illustrano come ottenere l'ID istanza di un processo e quindi usarla per arrestare un processo. A differenza del nome di un processo, che non è univoco, l'ID istanza è univoco.

Esempio 3: Ottenere processi che includono un comando specifico

PS C:\> Get-Job -Command "*get-process*"

Questo comando ottiene i processi nel sistema che includono un comando Get-Process. Usa il parametro Command di Get-Job per limitare il numero di processi recuperati. Il comando usa caratteri jolly (*) per ottenere processi che includono un comando Get-Process in qualsiasi punto della stringa di comando.

Esempio 4: Ottenere processi che includono un comando specifico usando la pipeline

PS C:\> "*get-process*" | Get-Job

Analogamente al comando nell'esempio precedente, questo comando ottiene i processi nel sistema che includono un comando Get-Process . Il comando usa un operatore pipeline (|) per inviare una stringa, tra virgolette, al cmdlet Get-Job . È l'equivalente del comando precedente.

Esempio 5: Ottenere processi non avviati

PS C:\> Get-Job -State NotStarted

Questo comando ottiene solo i processi che sono stati creati ma non ancora avviati. Include i processi pianificati per l'esecuzione futura e quelli non ancora pianificati.

Esempio 6: Ottenere processi a cui non è stato assegnato un nome

PS C:\> Get-Job -Name Job*

Questo comando ottiene tutti i processi con nomi di processo che iniziano con il processo. <Poiché il numero> di processo è il nome predefinito di un processo, questo comando ottiene tutti i processi che non hanno un nome assegnato in modo esplicito.

Esempio 7: Usare un oggetto processo per rappresentare il processo in un comando

The first command uses the **Start-Job** cmdlet to start a background job that runs a **Get-Process** command on the local computer. The command uses the *Name* parameter of **Start-Job** to assign a friendly name to the job.
PS C:\> Start-Job -ScriptBlock {Get-Process} -Name MyJob

The second command uses Get-Job to get the job. It uses the *Name* parameter of **Get-Job** to identify the job. The command saves the resulting job object in the $j variable.
PS C:\> $j = Get-Job -Name MyJob

The third command displays the value of the job object in the $j variable. The value of the **State** property shows that the job is completed. The value of the **HasMoreData** property shows that there are results available from the job that have not yet been retrieved.
PS C:\> $j
Id     Name            PSJobTypeName   State         HasMoreData     Location             Command
--     ----            -------------   -----         -----------     --------             -------
6      MyJob           BackgroundJob   Completed     True            localhost            Get-Process

The fourth command uses the **Receive-Job** cmdlet to get the results of the job. It uses the job object in the $j variable to represent the job. You can also use a pipeline operator to send a job object to **Receive-Job**.
PS C:\> Receive-Job -Job $j
Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
    124       4    13572      12080    59            1140 audiodg
    783      16    11428      13636   100             548 CcmExec
     96       4     4252       3764    59            3856 ccmsetup
...

Questo esempio illustra come usare Get-Job per ottenere un oggetto processo e quindi come usarlo per rappresentare il processo in un comando.

Esempio 8: Ottenere tutti i processi, inclusi i processi avviati da un metodo diverso

The first command uses the **Start-Job** cmdlet to start a job on the local computer.
PS C:\> Start-Job -ScriptBlock {Get-EventLog System}

The second command uses the *AsJob* parameter of the **Invoke-Command** cmdlet to start a job on the S1 computer. Even though the commands in the job run on the remote computer, the job object is created on the local computer, so you use local commands to manage the job.
PS C:\> Invoke-Command -ComputerName S1 -ScriptBlock {Get-EventLog System} -AsJob

The third command uses the **Invoke-Command** cmdlet to run a **Start-Job** command on the S2 computer. By using this method, the job object is created on the remote computer, so you use remote commands to manage the job.
PS C:\> Invoke-Command -ComputerName S2 -ScriptBlock {Start-Job -ScriptBlock {Get-EventLog System}}

The fourth command uses **Get-Job** to get the jobs stored on the local computer. The **PSJobTypeName** property of jobs, introduced in Windows PowerShell 3.0, shows that the local job started by using the **Start-Job** cmdlet is a background job and the job started in a remote session by using the **Invoke-Command** cmdlet is a remote job.
PS C:\> Get-Job
Id     Name       PSJobTypeName   State         HasMoreData     Location        Command
--     ----       -------------   -----         -----------     --------        -------
1      Job1       BackgroundJob   Running       True            localhost       Get-EventLog System
2      Job2       RemoteJob       Running       True            S1              Get-EventLog System

The fifth command uses **Invoke-Command** to run a **Get-Job** command on the S2 computer.The sample output shows the results of the Get-Job command. On the S2 computer, the job appears to be a local job. The computer name is localhost and the job type is a background job.For more information about how to run background jobs on remote computers, see about_Remote_Jobs.
PS C:\> Invoke-Command -ComputerName S2 -ScriptBlock {Start-Job -ScriptBlock {Get-EventLog System}}
Id    Name     PSJobTypeName  State      HasMoreData   Location   Command
--    ----     -------------  -----      -----------   -------    -------
4     Job4     BackgroundJob  Running    True          localhost  Get-Eventlog System

In questo esempio viene illustrato che il cmdlet Get-Job può ottenere tutti i processi avviati nella sessione corrente, anche se sono stati avviati usando metodi diversi.

Esempio 9: Analizzare un processo non riuscito

The first command uses the **Start-Job** cmdlet to start a job on the local computer. The job object that **Start-Job** returns shows that the job failed. The value of the **State** property is Failed.
PS C:\> Start-Job -ScriptBlock {Get-Process}
Id     Name       PSJobTypeName   State       HasMoreData     Location             Command
--     ----       -------------   -----       -----------     --------             -------
1      Job1       BackgroundJob   Failed      False           localhost            Get-Process

The second command uses the **Get-Job** cmdlet to get the job. The command uses the dot method to get the value of the **JobStateInfo** property of the object. It uses a pipeline operator to send the object in the **JobStateInfo** property to the Format-List cmdlet, which formats all of the properties of the object (*) in a list.The result of the **Format-List** command shows that the value of the **Reason** property of the job is blank.
PS C:\> (Get-Job).JobStateInfo | Format-List -Property *
State  : Failed
Reason :

The third command investigates more. It uses a **Get-Job** command to get the job and then uses a pipeline operator to send the whole job object to the **Format-List** cmdlet, which displays all of the properties of the job in a list.The display of all properties in the job object shows that the job contains a child job named Job2.
PS C:\> Get-Job | Format-List -Property *
HasMoreData   : False
StatusMessage :
Location      : localhost
Command       : get-process
JobStateInfo  : Failed
Finished      : System.Threading.ManualReset
EventInstanceId    : fb792295-1318-4f5d-8ac8-8a89c5261507
Id            : 1
Name          : Job1
ChildJobs     : {Job2}
Output        : {}
Error         : {}
Progress      : {}
Verbose       : {}
Debug         : {}
Warning       : {}
StateChanged  :

The fourth command uses **Get-Job** to get the job object that represents the Job2 child job. This is the job in which the command actually ran. It uses the dot method to get the **Reason** property of the **JobStateInfo** property.The result shows that the job failed because of an Access Denied error. In this case, the user forgot to use the Run as administrator option when starting Windows PowerShell.Because background jobs use the remoting features of Windows PowerShell, the computer must be configured for remoting to run a job, even when the job runs on the local computer.For information about requirements for remoting in Windows PowerShell, see about_Remote_Requirements. For troubleshooting tips, see about_Remote_Troubleshooting.
PS C:\> (Get-Job -Name job2).JobStateInfo.Reason
Connecting to remote server using WSManCreateShellEx api failed. The async callback gave the following error message: Access is denied.

Questo comando illustra come usare l'oggetto processo restituito da Get-Job per analizzare il motivo per cui un processo non è riuscito. Mostra anche come ottenere i processi figlio di ogni processo.

Esempio 10: Ottenere risultati filtrati

The first command uses the **Workflow** keyword to create the WFProcess workflow.
PS C:\> Workflow WFProcess {Get-Process}

The second command uses the *AsJob* parameter of the WFProcess workflow to run the workflow as a background job. It uses the *JobName* parameter of the workflow to specify a name for the job, and the *PSPrivateMetadata* parameter of the workflow to specify a custom ID.
PS C:\> WFProcess -AsJob -JobName WFProcessJob -PSPrivateMetadata @{MyCustomId = 92107}

The third command uses the *Filter* parameter of **Get-Job** to get the job by custom ID that was specified in the *PSPrivateMetadata* parameter.
PS C:\> Get-Job -Filter @{MyCustomId = 92107}
Id     Name            State         HasMoreData     Location             Command
--     ----            -----         -----------     --------             -------
1      WFProcessJob    Completed     True            localhost            WFProcess

Questo esempio illustra come usare il parametro Filter per ottenere un processo del flusso di lavoro. Il parametro Filter, introdotto in Windows PowerShell 3.0, è valido solo per i tipi di processo personalizzati, ad esempio processi del flusso di lavoro e processi pianificati.

Esempio 11: Ottenere informazioni sui processi figlio

The first command gets the jobs in the current session. The output includes a background job, a remote job and several instances of a scheduled job. The remote job, Job4, appears to have failed.
PS C:\> Get-Job
Id     Name            PSJobTypeName   State         HasMoreData     Location             Command
--     ----            -------------   -----         -----------     --------             -------
2      Job2            BackgroundJob   Completed     True            localhost            .\Get-Archive.ps1
4      Job4            RemoteJob       Failed        True            Server01, Server02   .\Get-Archive.ps1
7      UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help
8      UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help
9      UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help
10     UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help

The second command uses the *IncludeChildJob* parameter of **Get-Job**. The output adds the child jobs of all jobs that have child jobs.In this case, the revised output shows that only the Job5 child job of Job4 failed.
PS C:\> Get-Job -IncludeChildJob
Id     Name            PSJobTypeName   State         HasMoreData     Location             Command
--     ----            -------------   -----         -----------     --------             -------
2      Job2            BackgroundJob   Completed     True            localhost           .\Get-Archive.ps1
3      Job3                            Completed     True            localhost           .\Get-Archive.ps1
4      Job4            RemoteJob       Failed        True            Server01, Server02  .\Get-Archive.ps1
5      Job5                            Failed        False           Server01            .\Get-Archive.ps1
6      Job6                            Completed     True            Server02            .\Get-Archive.ps1
7      UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help
8      UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help
9      UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help
10     UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help

The third command uses the *ChildJobState* parameter with a value of Failed.The output includes all parent jobs and only the child jobs that failed.
PS C:\> Get-Job -Name Job4 -ChildJobState Failed
Id     Name            PSJobTypeName   State         HasMoreData     Location             Command
--     ----            -------------   -----         -----------     --------             -------
2      Job2            BackgroundJob   Completed     True            localhost           .\Get-Archive.ps1
4      Job4            RemoteJob       Failed        True            Server01, Server02  .\Get-Archive.ps1
5      Job5                            Failed        False           Server01            .\Get-Archive.ps1
7      UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help
8      UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help
9      UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help
10     UpdateHelpJob   PSScheduledJob  Completed     True            localhost            Update-Help

The fifth command uses the **JobStateInfo** property of jobs and its **Reason** property to discover why Job5 failed.
PS C:\> (Get-Job -Name Job5).JobStateInfo.Reason
Connecting to remote server Server01 failed with the following error message:
Access is denied.
For more information, see the about_Remote_Troubleshooting Help topic.

Questo esempio illustra l'effetto dell'uso dei parametri IncludeChildJob e ChildJobState del cmdlet Get-Job.

Parametri

-After

Ottiene i processi completati dopo la data e l'ora specificate. Immettere un oggetto DateTime , ad esempio quello restituito dal cmdlet Get-Date o una stringa che può essere convertita in un oggetto DateTime , ad esempio Dec 1, 2012 2:00 AM o 11/06.

Questo parametro funziona solo su tipi di processo personalizzati, ad esempio processi del flusso di lavoro e processi pianificati, che hanno una proprietà EndTime. Non funziona su processi in background standard, ad esempio quelli creati usando il cmdlet Start-Job . Per informazioni sul supporto di questo parametro, vedere l'argomento della Guida relativo al tipo di processo.

Questo parametro è stato introdotto in Windows PowerShell 3.0.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Before

Ottiene i processi completati prima della data e dell'ora specificate. Immettere un oggetto DateTime .

Questo parametro funziona solo su tipi di processo personalizzati, ad esempio processi del flusso di lavoro e processi pianificati, che hanno una proprietà EndTime. Non funziona su processi in background standard, ad esempio quelli creati usando il cmdlet Start-Job . Per informazioni sul supporto di questo parametro, vedere l'argomento della Guida relativo al tipo di processo.

Questo parametro è stato introdotto in Windows PowerShell 3.0.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ChildJobState

Ottiene solo i processi figlio con lo stato specificato. I valori validi per questo parametro sono:

  • NotStarted
  • In esecuzione
  • Completato
  • Non riuscito
  • Arrestato
  • Bloccato
  • Suspended
  • Disconnesso
  • Suspending
  • Stopping

Per impostazione predefinita, Get-Job non ottiene processi figlio. Usando il parametro IncludeChildJob , Get-Job ottiene tutti i processi figlio. Se si usa il parametro ChildJobState, il parametro IncludeChildJob non ha effetto.

Questo parametro è stato introdotto in Windows PowerShell 3.0.

Type:JobState
Accepted values:NotStarted, Running, Completed, Failed, Stopped, Blocked, Suspended, Disconnected, Suspending, Stopping, AtBreakpoint
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Command

Specifica una matrice di comandi come stringhe. Questo cmdlet ottiene i processi che includono i comandi specificati. Il valore predefinito corrisponde a tutti i processi. È possibile usare caratteri jolly per specificare un modello di comando.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:True

-Filter

Specifica una tabella hash di condizioni. Questo cmdlet ottiene processi che soddisfano tutte le condizioni. Immettere una tabella hash in cui le chiavi sono le proprietà del processo e i valori sono i valori di queste proprietà.

Questo parametro funziona solo su tipi di processo personalizzati, ad esempio i processi del flusso di lavoro e i processi pianificati. Non funziona sui processi in background standard, ad esempio quelli creati usando il cmdlet Start-Job . Per informazioni sul supporto di questo parametro, vedere l'argomento della Guida relativo al tipo di processo.

Questo parametro è stato introdotto in Windows PowerShell 3.0.

Type:Hashtable
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-HasMoreData

Indica se questo cmdlet ottiene solo processi con il valore della proprietà HasMoreData specificato. La proprietà HasMoreData indica se nella sessione corrente sono stati ricevuti tutti i risultati dei processi. Per ottenere processi con più risultati, specificare un valore di $True. Per ottenere processi che non hanno più risultati, specificare un valore di $False.

Per ottenere i risultati di un processo, usare il cmdlet Receive-Job.

Quando si usa il cmdlet Receive-Job , viene eliminato dall'archiviazione in memoria specifica della sessione i risultati restituiti. Quando ha restituito tutti i risultati del processo nella sessione corrente, imposta il valore della proprietà HasMoreData del processo su $False) per indicare che non ha più risultati per il processo nella sessione corrente. Usare il parametro Keep di Receive-Job per impedire a Receive-Job di eliminare i risultati e di cambiare il valore della proprietà HasMoreData. Per ulteriori informazioni, digitare Get-Help Receive-Job.

La proprietà HasMoreData è specifica della sessione corrente. Se i risultati per un tipo di processo personalizzato vengono salvati all'esterno della sessione, ad esempio il tipo di processo pianificato, che salva i risultati del processo su disco, è possibile usare il cmdlet Receive-Job in una sessione diversa per ottenere nuovamente i risultati del processo, anche se il valore di HasMoreData è $False. Per altre informazioni, vedere gli argomenti della Guida sul tipo di processo personalizzato.

Questo parametro è stato introdotto in Windows PowerShell 3.0.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

Specifica una matrice di ID di processi che ottiene questo cmdlet.

L'ID è un intero che identifica in modo univoco il processo nella sessione corrente. È più semplice ricordare e digitare l'ID dell'istanza, ma è univoco solo nella sessione corrente. È possibile digitare uno o più ID separati da virgole. Per trovare l'ID di un processo, digitare Get-Job senza parametri.

Type:Int32[]
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IncludeChildJob

Indica che questo cmdlet restituisce processi figlio, oltre ai processi padre.

Questo parametro è particolarmente utile per analizzare i processi del flusso di lavoro, per i quali Get-Job restituisce un processo padre del contenitore e gli errori del processo, perché il motivo dell'errore viene salvato in una proprietà del processo figlio.

Questo parametro è stato introdotto in Windows PowerShell 3.0.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InstanceId

Specifica una matrice di ID istanza di processi che ottiene questo cmdlet. Il valore predefinito corrisponde a tutti i processi.

Un ID istanza è un GUID che identifica in modo univoco il processo nel computer. Per trovare l'ID istanza di un processo, usare Get-Job.

Type:Guid[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifica una matrice di nomi descrittivi dell'istanza dei processi che ottiene questo cmdlet. Immettere un nome di processo oppure usare caratteri jolly per immettere un modello di nome di processo. Per impostazione predefinita, Get-Job ottiene tutti i processi della sessione corrente.

Type:String[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-Newest

Specifica un numero di processi da ottenere. Questo cmdlet ottiene i processi che hanno terminato più di recente.

Il parametro Newest non ordina né restituisce i processi più recenti nell'ordine in base all'ora di completamento. Per ordinare l'output, usare il cmdlet Sort-Object.

Questo parametro è stato introdotto in Windows PowerShell 3.0.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-State

Specifica uno stato del processo. Questo cmdlet ottiene solo processi nello stato specificato. I valori validi per questo parametro sono:

  • NotStarted
  • In esecuzione
  • Completato
  • Non riuscito
  • Arrestato
  • Bloccato
  • Suspended
  • Disconnesso
  • Suspending
  • Stopping

Per impostazione predefinita, Get-Job ottiene tutti i processi della sessione corrente.

Per altre informazioni sugli stati dei processi, vedere Enumerazione JobState nella libreria MSDN.

Type:JobState
Accepted values:NotStarted, Running, Completed, Failed, Stopped, Blocked, Suspended, Disconnected, Suspending, Stopping, AtBreakpoint
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Input

None

Non è possibile inviare input tramite pipe a questo cmdlet.

Output

System.Management.Automation.RemotingJob

Questo cmdlet restituisce oggetti che rappresentano i processi nella sessione.

Note

  • La proprietà PSJobTypeName dei processi indica il tipo di processo. Il valore della proprietà è determinato dall'autore del tipo di processo. L'elenco seguente indica i tipi di processo più comuni.

    • BackgroundJob. Processo locale avviato usando Start-Job.

    • RemoteJob. Processo avviato in una sessione PSSession usando il parametro AsJob del cmdlet Invoke-Command.

    • PSWorkflowJob. processo avviato con il parametro comune AsJob dei flussi di lavoro.