> 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/new-dsentitypermission.md).

# New-DSEntityPermission

### Sintesi

Creare un oggetto autorizzazione per un'entità

### Sintassi

#### WithExistenceCheck (predefinito)

```
New-DSEntityPermission [-Override] <SecurityRoleOverride> [-Right] <SecurityRoleRight>
 [-User <string[]>] [-Role <string[]>] [-Application <string[]>] [<CommonParameters>]
```

#### WithoutExistenceCheck

```
New-DSEntityPermission [-Override] <SecurityRoleOverride> [-Right] <SecurityRoleRight>
 [-PrincipalId] <guid[]> [<CommonParameters>]
```

### Descrizione

Creare un oggetto autorizzazione per un'entità. I parametri User, Role e Application possono essere specificati tramite il loro ID o il loro nome. Per un'applicazione, il nome si riferisce all'Application ID poiché il nome visualizzato non è necessariamente univoco. L'esistenza di tutte le entità verrà confermata, con un messaggio di avviso per quelle non trovate. Il parametro ID accetta solo ID, che corrispondano a un utente, a un gruppo di utenti o a un'applicazione. Nessuna verifica di esistenza verrà eseguita sulle entità specificate tramite questo parametro, quindi si assicuri che vengano utilizzati gli ID corretti. Poiché non viene effettuata alcuna verifica, è molto più rapido.

### Esempi

#### Esempio 1

```powershell
PS C:\> $permission = New-DSEntityPermission -Override Custom -Right Delete -User MyUserA, MyUserB
        $pamRoot = Get-DSPamFolder -VaultID $pamVaultID -Root
        Set-DSEntityPermission -EntityID $pamRoot.ID -Permissions $permission
```

Per gli account PAM nella cassaforte PAM il cui ID è $pamVaultID, il diritto predefinito di eliminazione verrà assegnato a MyUserA e MyUserB.

#### Esempio 2

```powershell
PS C:\> $userIDs = Get-DSUser | Where Name -like *something* | Select -ExpandProperty ID
        $permission = New-DSEntityPermission -Override CustomInherited -Right Edit -PrincipalId $userIDs
        Set-DSEntityPermission -EntityID $entryID -Permissions $permission
```

Aggiunge gli utenti il cui nome contiene 'something' agli utenti ereditati che possono modificare la voce il cui ID è memorizzato in $entryID

### Parametri

#### -Application

Identità applicative autorizzate ad accedere al diritto. Possono essere specificate tramite il loro Application ID o il loro ID.

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

#### -Override

Definisce come vengono determinate le autorizzazioni. Sono disponibili cinque modalità: Custom: specificare un valore personalizzato per l'autorizzazione. Solo gli utenti, i gruppi di utenti e le applicazioni specificati avranno l'autorizzazione. CustomInherited: combinazione di Inherited e Custom. Aggiunge ulteriori utenti, gruppi di utenti e applicazioni a quelli ereditati. Everyone: equivalente ad Allowed nell'interfaccia utente. L'autorizzazione è concessa a tutti. Inherited: eredita l'autorizzazione dal padre Never: equivalente a Disallowed nell'interfaccia utente. L'autorizzazione non è concessa a nessuno tranne che agli amministratori

```yaml
Type: Devolutions.RemoteDesktopManager.SecurityRoleOverride
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -PrincipalId

ID di utenti, ruoli e applicazioni senza verificarne l'esistenza. Procedere con questo parametro è molto più rapido rispetto ai parametri User, Role o Application.

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

#### -Right

Definisce quale diritto viene modificato

```yaml
Type: Devolutions.RemoteDesktopManager.SecurityRoleRight
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -Role

Ruoli (gruppi di utenti) autorizzati ad accedere al diritto. Possono essere specificati tramite il loro nome o il loro ID.

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

#### -User

Utenti autorizzati ad accedere al diritto. Possono essere specificati tramite il loro nome o il loro ID.

```yaml
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: WithExistenceCheck
  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 New-DSEntityPermission -detailed". Per informazioni tecniche, digiti "Get-Help New-DSEntityPermission -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/new-dsentitypermission.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.
