Online Help > PowerShell Scripting

Set-RDMSessionPassword

SYNOPSIS

Set the password from the specified session.

 

SYNTAX

Set-RDMSessionPassword -ID [ID] <Guid> -Password [Password] <SecureString> -Refresh [Refresh] <SwitchParameter> -Session [Session] <PSConnection> [<CommonParameters>]

 

DESCRIPTION

Set the password from the specified session. Session must be marked as "Allow show credentials" if not null is returned.

 

PARAMETERS

  -ID <Guid>

(Required) Specifies the ID of the session to get the password from.

 

Must be a valid GUID, in the form {00000000-0000-0000-0000-000000000000}.

 

  -Password <SecureString>

(Required) Password as SecureString.

 

Use either "Read-Host -AsSecureString" or "ConvertTo-SecureString"

 

  -Refresh <SwitchParameter>

Send refresh notification to Remote Desktop Manager application.

 

  -Session <PSConnection>

(Required) Specifies the session to set the password to.

 

  <CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer and OutVariable.For more information, type, "get-help about_commonparameters".

 

NOTES

For more information, type "Get-Help Set-RDMSessionPassword -detailed". For technical information, type "Get-Help Set-RDMSessionPassword -full".

 

EXAMPLE 1

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

 

Set the password from the session with ID = "{00000000-0000-0000-0000-000000000000}".

 

EXAMPLE 2

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

 

Retrieves the list of available sessions and sets the password from the the second element in the list.

 

RELATED LINKS

Get-RDMSession

Get-RDMSessionDomain

Get-RDMSessionPassword

Get-RDMSessionUserName

Set-RDMSessionDomain

Set-RDMSessionUsername