Online Help > PowerShell Scripting

Set-RDMSessionProperty

SYNOPSIS

Set the value of property given a session ID and path.

 

SYNTAX

Set-RDMSessionProperty -ID [ID] <Guid> -Refresh [Refresh] <SwitchParameter> -Path [Path] <String> -Property [Property] <String> -Value [Value] <Object> [<CommonParameters>]

 

DESCRIPTION

Protected values will always return null.

 

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}.

 

  -Refresh <SwitchParameter>

Send refresh notification to Remote Desktop Manager application.

 

  -Path <String>

The path to the property being read (reference RDM export xml). In the case of top level property do not specify parameter or pass empty string [""] or $null.

 

  -Property <String>

(Required) Property to set.

 

  -Value <Object>

(Required) New value.

 

  <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-RDMSessionProperty -detailed". For technical information, type "Get-Help Set-RDMSessionProperty -full".

 

EXAMPLE 1

PS C:\> Set-RDMSessionProperty -ID "{00000000-0000-0000-0000-000000000000}" -Property "Group" -Value "My New Group Name"

 

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

 

EXAMPLE 2

PS C:\> Set-RDMSessionProperty "{00000000-0000-0000-0000-000000000000}" "MetaInformation" "OS" "Windows Server 2008 R2"

 

Set the MetaInformation.OS value from the session with ID = "{00000000-0000-0000-0000-000000000000}".

 

EXAMPLE 3

PS C:\> $list = Get-RDMSession; Set-RDMSessionProperty -ID $list[1].ID -Path "MetaInformation" -Property "OS" -Value "Windows Server 2008 R2"

 

Retrieves the list of available sessions and then sets the MetaInformation.OS value of the the second element in the list.

 

RELATED LINKS

Get-RDMSession

Get-RDMSessionProperty