> 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/it/powershell-commands/get-dspamaccount.md).

# Get-DSPamAccount

### Sinossi

Recupera gli account pam.

### Sintassi

#### GetByFolder (predefinito)

```
Get-DSPamAccount [-VaultID <guid>] [-AddActiveCheckoutID] [-IncludeDomainName] [-AsLegacyResponse]
 [<CommonParameters>]
```

#### GetByID

```
Get-DSPamAccount -AccountID <guid> [-AddActiveCheckoutID] [-IncludeDomainName] [-AsLegacyResponse]
 [<CommonParameters>]
```

#### BasicInformation

```
Get-DSPamAccount -AsBasicInformation [-VaultID <guid>] [-AsLegacyResponse] [<CommonParameters>]
```

### Descrizione

Recupera gli account pam. Ci sono tre modi per farlo. Primo, ottenere un account specifico utilizzando il parametro AccountID. Secondo, ottenere tutti gli account pam chiamando il cmdlet senza parametri. Terzo, ottenere tutti gli account pam di una cartella specifica utilizzando il parametro FolderID. Nel caso in cui vi siano molti account PAM, è possibile che si verifichi una TryGoOfflineException. In tal caso, ci sono due modi per evitare questo errore. Primo, quando si chiama New-DSSession, utilizzare il parametro Timeout per aumentare il ritardo di polling. Un altro modo è utilizzare lo switch AsBasicInformation di questo cmdlet. Questo restituirà un oggetto semplificato con le informazioni per identificare rapidamente gli account PAM di interesse.

### Esempi

#### Esempio 1

```powershell
PS C:\> $searchRes = Search-DSEntry -By Username -Match ExactExpression -Value 'MyUsername' -IncludePamVaults -IncludeVault @();
        $search = $searchRes[0];
        $pamAccountRes = Get-DSPamAccount -AccountID $search.ID
```

Ottiene l'account PAM il cui nome utente è 'MyUsername'. In questo esempio si presume che il nome utente sia univoco, quindi il risultato della ricerca contiene un singolo risultato.

#### Esempio 2

```powershell
PS C:\> $pamBasicRes = Get-DSPamAccount -AsBasicInformation;
        $nameStarts = $pamBasicRes | Where Label -like 'MyName*';
        foreach ($pamBasic in $nameStarts) { Remove-DSPamAccount -AccountID $pamBasic.ID }
```

Elimina tutti gli account PAM il cui nome inizia con 'MyName'.

### Parametri

#### -AccountID

ID dell'account pam

```yaml
Type: System.Guid
DefaultValue: ''
SupportsWildcards: false
Aliases:
- PamCredentialID
ParameterSets:
- Name: GetByID
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -AddActiveCheckoutID

Aggiunge la proprietà CheckoutID contenente l'ID del check-out attivo

```yaml
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: GetByID
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: GetByFolder
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -AsBasicInformation

L'oggetto restituito sarà semplificato. Consente una semplice identificazione dell'account PAM (ID, Label, Username, Domain), della sua cartella PAM (FolderID, FolderName) e della sua cassaforte PAM (TeamFolderID). È più rapido rispetto all'ottenimento degli oggetti account PAM completi.

```yaml
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: BasicInformation
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -AsLegacyResponse

Nelle versioni precedenti alla 2024.2, molti cmdlet DS restituivano un oggetto ServerResponse. L'abilitazione di questo switch di compatibilità con le versioni precedenti consente il corretto funzionamento degli script sviluppati per le versioni precedenti.

```yaml
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -IncludeDomainName

Include il nome del dominio. Verrà recuperato dal provider PAM. Può essere utilizzato da non amministratori.

```yaml
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: GetByID
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: GetByFolder
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -VaultID

Ottiene tutti gli account nella cartella specificata

```yaml
Type: System.Guid
DefaultValue: ''
SupportsWildcards: false
Aliases:
- FolderID
ParameterSets:
- Name: GetByFolder
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: BasicInformation
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### CommonParameters

Questo cmdlet supporta i parametri comuni: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction e -WarningVariable. Per maggiori informazioni, veda [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Note

Per maggiori informazioni, digiti "Get-Help Get-DSPamAccount -detailed". Per informazioni tecniche, digiti "Get-Help Get-DSPamAccount -full".


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell/it/powershell-commands/get-dspamaccount.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
