Is there a way in powershell to change advance system settings in the remote tab? Picture is attached for reference.
Asked
Active
Viewed 270 times
0

JW12689
- 117
- 1
- 10
1 Answers
0
Try this
[uint32]$atsc = 1
[uint32]$mfe = 1
$ts = Get-CimInstance -Namespace Root\CIMv2\TerminalServices -ClassName Win32_TerminalServiceSetting
Invoke-CimMethod -InputObject $ts -MethodName SetAllowTSConnections -Arguments @{AllowTSConnections = $atsc; ModifyFirewallException = $mfe}

Richard Siddaway
- 451
- 2
- 4
-
Get an error when doing this: Invoke-CimMethod : Invalid operation At line:4 char:1 + Invoke-CimMethod -InputObject $ts -MethodName SetAllowTSConnections -Arguments @ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (Win32_TerminalS...= "CMPNAME"):CimInstance) [Invoke-CimMethod], CimException + FullyQualifiedErrorId : HRESULT 0x80041016,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand – JW12689 Sep 07 '18 at 15:15
-
What version of Windows are you running on? Can you show the exact code you're using – Richard Siddaway Sep 08 '18 at 11:34