> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/it/comandi-powershell/get-psujob.md).

# Get-PSUJob

Get-PSUJob recupera i job eseguiti in PowerShell Universal, filtrabili per stato, Id, Id di esecuzione o identità che li ha attivati.

## SINOSSI

Recupera i job eseguiti in PowerShell Universal.

## SINTASSI

```powershell
Get-PSUJob [-Status <JobStatus>] [-OrderBy <String>] [-OrderDirection <OrderDirection>] [-HideChildren <Boolean>] [-HideScheduled <Boolean>] [-HideTriggered <Boolean>] [-HideArchived <Boolean>] [-Skip <UInt64>] [-First <UInt64>] [-IncludeTotalCount] [<ConnectionOptions>] [<CommonParameters>]
Get-PSUJob -Id <Int64> [-HideChildren <Boolean>] [<ConnectionOptions>] [<CommonParameters>]
Get-PSUJob -RunId <Guid> [-HideChildren <Boolean>] [<ConnectionOptions>] [<CommonParameters>]
Get-PSUJob -Identity <Identity> [-Status <JobStatus>] [-OrderBy <String>] [-OrderDirection <OrderDirection>] [-HideChildren <Boolean>] [-HideScheduled <Boolean>] [-HideTriggered <Boolean>] [-HideArchived <Boolean>] [-Skip <UInt64>] [-First <UInt64>] [-IncludeTotalCount] [<ConnectionOptions>] [<CommonParameters>]
Get-PSUJob -Script <Script> [-Status <JobStatus>] [-OrderBy <String>] [-OrderDirection <OrderDirection>] [-HideChildren <Boolean>] [-HideScheduled <Boolean>] [-HideTriggered <Boolean>] [-HideArchived <Boolean>] [-Skip <UInt64>] [-First <UInt64>] [-IncludeTotalCount] [<ConnectionOptions>] [<CommonParameters>]
Get-PSUJob -Schedule <Schedule> [-Status <JobStatus>] [-OrderBy <String>] [-OrderDirection <OrderDirection>] [-HideChildren <Boolean>] [-HideScheduled <Boolean>] [-HideTriggered <Boolean>] [-HideArchived <Boolean>] [-Skip <UInt64>] [-First <UInt64>] [-IncludeTotalCount] [<ConnectionOptions>] [<CommonParameters>]
```

`<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`.

## DESCRIZIONE

Elenca i job o recupera un job per ID o ID di esecuzione. `-Id` cerca i job padre e figlio correlati, a meno che `-HideChildren $true` non nasconda i figli. `-RunId` richiede la funzionalità JobRunId. Le query di elenco supportano la paginazione di PowerShell, lo stato e l'ordinamento. Nell'implementazione corrente, `-HideArchived` si applica alle query di elenco di `-Identity`, `-Script` e `-Schedule`, ma non all'elenco predefinito di tutti i job. Sebbene il parametro `-Schedule` sia accettato, la sua implementazione della query di elenco non applica attualmente un filtro di pianificazione.

## ESEMPI

```powershell
Get-PSUJob -RunId 'a1b2c3d4-1111-2222-3333-444455556666'
Get-PSUScript -Id 4 | Get-PSUJob -HideArchived $true
```

## PARAMETRI

| Parametro                | Descrizione                                                                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| `-Id`                    | Recupera un job per ID numerico.                                                                                                     |
| `-RunId`                 | Recupera un job per GUID di esecuzione.                                                                                              |
| `-Identity`              | Elenca i job di un'identità; accetta l'input della pipeline.                                                                         |
| `-Script`                | Elenca i job di uno script; accetta l'input della pipeline.                                                                          |
| `-Schedule`              | Accetta un oggetto pianificazione tramite la pipeline; la query di elenco corrente non filtra per pianificazione.                    |
| `-Status`                | Filtra le query di elenco per stato.                                                                                                 |
| `-OrderBy`               | Ordina gli elenchi per `Id`, `StartTime` o `EndTime` (`Id` per impostazione predefinita).                                            |
| `-OrderDirection`        | Seleziona la direzione di ordinamento per le query di elenco.                                                                        |
| `-HideChildren`          | Nasconde i job figlio (`$true`); si applica agli elenchi e alle ricerche di dettaglio.                                               |
| `-HideScheduled`         | Esclude i job pianificati dagli elenchi quando il valore è `$true`.                                                                  |
| `-HideTriggered`         | Esclude i job attivati dagli elenchi quando il valore è `$true`.                                                                     |
| `-HideArchived`          | Esclude i job archiviati quando si usano `-Identity`, `-Script` o `-Schedule`; non si applica all'elenco predefinito di tutti i job. |
| `-Skip`                  | Salta questo numero di job durante la paginazione di un elenco.                                                                      |
| `-First`                 | Restituisce al massimo questo numero di job durante la paginazione di un elenco.                                                     |
| `-IncludeTotalCount`     | Emette il numero totale di job corrispondenti per un elenco paginato.                                                                |
| `-ComputerName`          | URL o nome host del server PSU di destinazione (alias `-Uri`).                                                                       |
| `-AppToken`              | Token dell'app per l'API di gestione.                                                                                                |
| `-Credential`            | Credenziali per l'API di gestione.                                                                                                   |
| `-UseDefaultCredentials` | Usa le credenziali Windows correnti.                                                                                                 |
| `-Integrated`            | Usa il client di gestione nel processo all'interno di PSU.                                                                           |
| `-TrustCertificate`      | Ignora gli errori di convalida del certificato.                                                                                      |
| `-Cookies`               | Riutilizza i cookie di autenticazione per questa sessione di PowerShell.                                                             |

## AUTORIZZAZIONI

Elencare o filtrare i job richiede `automation.jobs/read`. Leggere un job tramite `-Id` o `-RunId` richiede `automation.jobs.<job ID>/read` per il job richiesto e per eventuali job padre o figlio restituiti. Un ReadPermission personalizzato corrispondente sul job può autorizzare anche l'accesso di dettaglio.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/it/comandi-powershell/get-psujob.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
