> 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/set-rdmusertag.md).

# Set-RDMUserTag

Set-RDMUserTag sostituisce per intero i tag assegnati a un utente di Remote Desktop Manager.

### Sinossi

Impostare i tag di un utente.

### Sintassi

#### \_\_AllParameterSets

```
Set-RDMUserTag [-User] <IPSUser> [-Tag] <string[]> [-PassThru] [-Set]
 [-ForcePromptAnswer <DialogResult[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### Descrizione

Impostare i tag di un utente. Questo sostituisce i tag dell'oggetto utente; usare l'opzione Set per salvarlo, oppure passare l'utente a Set-RDMUser per rendere persistente la modifica. L'elenco sostituisce per intero i tag dell'utente, quindi tutto ciò che non nomina viene cancellato: per cambiare un tag e conservare il resto, partire dall'elenco restituito da Get-RDMUserTag. I tag personalizzati possono contenere solo lettere, cifre, spazi e i caratteri . - \_ : Contractor non è assegnabile liberamente: identifica un utente contractor, quindi viene rifiutato su qualsiasi altro utente e sempre conservato su un utente contractor, indipendentemente dal fatto che l'elenco lo nomini. Richiede l'autorizzazione a modificare gli utenti.

### Esempi

#### Esempio 1

```powershell
PS C:\> $user = Get-RDMUser -Name 'jdoe'
PS C:\> Set-RDMUserTag -User $user -Tag @('External', 'Finance', 'Tier 1')
PS C:\> Set-RDMUser $user
```

Sostituisce ogni tag dell'utente jdoe, quindi salva l'utente. External diventa un tag di sistema; Finance e Tier 1 diventano tag personalizzati.

#### Esempio 2

```powershell
PS C:\> Set-RDMUserTag -User (Get-RDMUser -Name 'jdoe') -Tag @('External', 'Finance') -Set
```

Sostituisce ogni tag dell'utente jdoe e lo salva in una sola chiamata, senza un Set-RDMUser separato.

#### Esempio 3

```powershell
PS C:\> Get-RDMUser | Where-Object { $_.Description -like '*service account*' } | ForEach-Object {
    $tags = @(Get-RDMUserTag -User $_)
    $tags += 'Service account'
    Set-RDMUserTag -User $_ -Tag $tags -PassThru
} | Set-RDMUser
```

Assegna tag agli utenti la cui descrizione li contrassegna come account di servizio, quindi li salva. Partire dall'elenco proprio dell'utente è ciò che ne conserva gli altri tag.

#### Esempio 4

```powershell
PS C:\> $user = Get-RDMUser -Name 'jdoe'
PS C:\> Set-RDMUserTag -User $user -Tag @()
PS C:\> Set-RDMUser $user
```

Cancella ogni tag dell'utente jdoe, quindi salva l'utente.

### Parametri

#### -Confirm

Richiede una conferma prima di eseguire il cmdlet.

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

#### -ForcePromptAnswer

Opzione da usare con cautela. Risponderà automaticamente ai prompt che pongono domande sì/no, sì/no/annulla oppure ok/annulla. In caso di più prompt, è possibile passare più valori a questo parametro. Ecco i valori accettati:

* Yes: accetta il prompt. Copre i valori OK e Automatic.
* No: rifiuta il prompt sì/no/annulla. "Cancel" è l'opzione di ripiego se non è presente l'opzione "No".
* Cancel: annulla il prompt sì/no/annulla. "No" è l'opzione di ripiego se non è presente l'opzione "Cancel".

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

#### -PassThru

Restituire l'utente modificato.

```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: ''
```

#### -Set

Salvare l'utente modificato. Senza di esso, i tag vengono applicati solo all'oggetto utente in memoria.

```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: ''
```

#### -Tag

Tag da assegnare, ottenuti da Get-RDMUserTag o indicati come elenco di nomi. Sostituisce per intero i tag dell'utente: passare una matrice vuota per cancellarli.

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

#### -User

Utente da contrassegnare, ottenuto da Get-RDMUser o New-RDMUser.

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

#### -WhatIf

Mostra cosa accadrebbe se il cmdlet venisse eseguito. Il cmdlet non viene eseguito.

```yaml
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  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).

### Input

#### RemoteDesktopManager.PowerShellModule.PSOutputObject.PSUserInfo

Utente da contrassegnare, ottenuto da Get-RDMUser o New-RDMUser

#### RemoteDesktopManager.PowerShellModule.PSOutputObject.PSCloudUserInfo

Utente Cloud da contrassegnare, ottenuto da Get-RDMUser o New-RDMUser

### Output

#### RemoteDesktopManager.PowerShellModule.PSOutputObject.PSUserInfo

Utente con i tag appena assegnati quando è specificato PassThru

#### RemoteDesktopManager.PowerShellModule.PSOutputObject.PSCloudUserInfo

Utente Cloud con i tag appena assegnati quando è specificato PassThru

### Note

Per maggiori informazioni, digiti "Get-Help Set-RDMUserTag -detailed". Per informazioni tecniche, digiti "Get-Help Set-RDMUserTag -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 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/it/powershell-commands/set-rdmusertag.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.
