【问题标题】:Powershell to change Advance System PropertiesPowershell 更改高级系统属性
【发布时间】:2019-02-12 22:14:54
【问题描述】:

powershell 有没有办法在远程选项卡中更改高级系统设置?附上图片供参考。

【问题讨论】:

    标签: powershell system-setting


    【解决方案1】:

    试试这个

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

    【讨论】:

    • 执行此操作时出错: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
    • 您在哪个版本的 Windows 上运行?你能显示你正在使用的确切代码吗
    猜你喜欢
    • 2010-12-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-03
    • 1970-01-01
    相关资源
    最近更新 更多