栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Windows开启winrm

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Windows开启winrm

非administrator用户需要执行以下步骤:

用户加到administrators组:

禁用UAC(改注册表)

为什么winrm要禁用uac,在这篇文章里可以找到:

Disable User Account Control (UAC) - Windows Server | Microsoft Docs

 

 

reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

Powershell执行:

Set-PSSessionConfiguration -Name Microsoft.PowerShell –showSecurityDescriptorUI

添加DPM用户读取、执行权限:

Powershell执行:

获取SDDL格式的当前访问描述符:

(Get-PSSessionConfiguration -Name "Microsoft.PowerShell").SecurityDescriptorSDDL

然后,您可以使用此SDDL字符串授予对任何其他服务器或工作站上PowerShell的访问权限。

注:每台服务器获得的描述符不一样,请将上面获取到描述符替换到$SDDL=“”

Powershell执行:

$SDDL = "O:NSG:BAD:P(A;;GA;;;BA)(A;;GXGR;;;S-1-5-21-3222124782-533421702-3897355594-1018)(A;;GA;;;RM)(A;;GA;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)"

Set-PSSessionConfiguration -Name Microsoft.PowerShell -SecurityDescriptorSddl $SDDL

Powershell执行

设置信任主机:

Set-Item WSMan:localhostclienttrustedhosts -value 192.168.40.63        ---DCP_IP

重启WMI服务:

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/893854.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号