0

Is there a way in powershell to change advance system settings in the remote tab? Picture is attached for reference.enter image description here

JW12689
  • 117
  • 1
  • 10

1 Answers1

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