> 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-rdmsessionpassword.md).

# Set-RDMSessionPassword

### Sinossi

Imposta la password dalla sessione specificata.

### Sintassi

#### Id

```
Set-RDMSessionPassword [-ID] <guid> [-Password] <securestring> [[-PasswordAge] <int>]
 [[-PasswordSinceDate] <datetime>] [-PassThru] [-Refresh] [-SetSession]
 [-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]
```

#### InputObject

```
Set-RDMSessionPassword [-Session] <PSConnection> [-Password] <securestring> [[-PasswordAge] <int>]
 [[-PasswordSinceDate] <datetime>] [-PassThru] [-Refresh] [-SetSession]
 [-ForcePromptAnswer <DialogResult[]>] [<CommonParameters>]
```

### Descrizione

Imposta la password dalla sessione specificata. La sessione deve essere contrassegnata come "Allow show credentials", altrimenti viene restituito null. Per rendere persistente la nuova password, è necessario utilizzare lo switch SetSession.

### Esempi

#### Esempio 1

```powershell
PS C:\> Set-RDMSessionPassword -ID "{00000000-0000-0000-0000-000000000000}" -Password (Read-Host -AsSecureString "Password") -SetSession
```

Imposta la password dalla sessione con ID = "{00000000-0000-0000-0000-000000000000}".

#### Esempio 2

```powershell
PS C:\> $list = Get-RDMSession; Set-RDMSessionPassword -ID $list[1].ID -Password (Read-Host -AsSecureString "Password") -SetSession
```

Recupera l'elenco delle sessioni disponibili e imposta la password dal secondo elemento dell'elenco.

#### Esempio 3

```powershell
PS C:\> Get-RDMSession -Name 'UniqueName' |
                    Set-RDMSessionDomain -Domain "MyOtherDomain.com" -PassThru |
                    Set-RDMSessionPassword -Password $securePassword -PassThru |
                    Set-RDMSessionUsername -UserName 'NewUserName' -PassThru |
                    Set-RDMSession
```

Modifica il dominio, la password e il nome utente della voce denominata 'UniqueName'. La variabile $securePassword è una stringa sicura impostata in precedenza. Rende persistente la modifica con la chiamata Set-RDMSession.

### Parametri

#### -ForcePromptAnswer

Switch da usare con cautela. Risponde automaticamente ai prompt che pongono domande sì/no, sì/no/annulla oppure ok/annulla. In caso di prompt multipli, è 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 riserva se non è presente l'opzione "No".
* Cancel: annulla il prompt sì/no/annulla. "No" è l'opzione di riserva 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: ''
```

#### -ID

Specifica l'ID della sessione da cui ottenere la password.

Deve essere un GUID valido, nella forma {00000000-0000-0000-0000-000000000000}.

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

#### -PassThru

Restituisce la voce modificata.

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

#### -Password

Password come SecureString.

Utilizzi "Read-Host -AsSecureString" oppure "ConvertTo-SecureString"

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

#### -PasswordAge

Specifica l'età della password in giorni. PasswordAge ha la precedenza su PasswordSinceDate.

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

#### -PasswordSinceDate

Specifica la data/ora (UTC) in cui la password è stata creata per la prima volta. PasswordAge ha la precedenza su PasswordSinceDate.

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

#### -Refresh

Invia una notifica di aggiornamento all'applicazione Remote Desktop Manager.

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

#### -Session

Specifica la sessione su cui impostare la password.

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

#### -SetSession

Salva la sessione nello spazio di lavoro corrente.

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

#### 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).

### Output

### Note

Per maggiori informazioni, digiti "Get-Help Set-RDMSessionPassword -detailed". Per informazioni tecniche, digiti "Get-Help Set-RDMSessionPassword -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/set-rdmsessionpassword.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.
