Hi,
I am trying to use Powershell to configure the Remote Desktop Connection Settings, and am stuck.
If I check the default values I get
Directory: RDS:\RDSConfiguration\Connections\RDP-Tcp\SessionTimeLimitSettings
Name Type CurrentValue
GP PermissibleValues PermissibleOperations
---- ---- ------------
-- ----------------- ---------------------
BrokenConnectionPolicy Integer 1 - 0, 1
Get-Item, Set-Item
BrokenConnectionAction Integer 0 No 0, 1
Get-Item, Set-Item
ActiveSessionLimit Integer 0 No
Get-Item, Set-Item
IdleSessionLimit Integer 0 No
Get-Item, Set-Item
DisconnectedSessionLimit Integer 0 No
Get-Item, Set-Item
TimeLimitPolicy Integer 1 -
0, 1 Get-Item, Set-Item
If set the following settings under the Sessions tab in the gui:
Overide User Settings - Checked
End a disconnected session: 15 mins
Active Session limit: Never:
Idle session limit: 1 day
Override user settings - Checked
End session
If I check the values afterwards, they are set to:
PS RDS:\RDSConfiguration\Connections\RDP-Tcp\SessionTimeLimitSettings> dir
Directory: RDS:\RDSConfiguration\Connections\RDP-Tcp\SessionTimeLimitSettings
Name Type CurrentValue
GP PermissibleValues PermissibleOperations
---- ---- ------------
-- ----------------- ---------------------
BrokenConnectionPolicy Integer 0 - 0, 1
Get-Item, Set-Item
BrokenConnectionAction Integer 1 No 0, 1
Get-Item, Set-Item
ActiveSessionLimit Integer 0 No
Get-Item, Set-Item
IdleSessionLimit Integer 86400000 No
Get-Item, Set-Item
DisconnectedSessionLimit Integer 900000 No
Get-Item, Set-Item
TimeLimitPolicy Integer 0 -
0, 1 Get-Item, Set-Item
If I take a clean server (Windows Server 2008 R2), and try and run the command to set the BrokenConnectionAction to 1 using
Set-Item -path RDS:\rdsconfiguration\connections\rdp-tcp\sessiontimelimitsettings\BrokenConnectionAction -value 0 it returns:
To set this item, BrokenConnectionPolicy must be set to a value of '0'
If I run the command:
Set-Item -path RDS:\rdsconfiguration\connections\rdp-tcp\sessiontimelimitsettings\BrokenConnectionPolicy -value 0 it prompts me for the value of "BrokenConnectionAction".
How can I either force BrokenConnectionAction to 1, or specify the value forBrokenConnectionAction at the same time when I change BrokenConnectionPolicy?
Muttley