首先我的 workingsetup:
DesktopPC: Windows 10 Pro,版本:10.0.10586 Build:10586,64-Bit
Laptop: Windows 10 Pro,版本:10.0.10586 Build:10586,64-Bit
User: 两台计算机都有 same 用户名和密码 .
我尝试使用笔记本电脑远程连接WMIC到我的DesktopPC并执行查询 .
我在Powershell中键入以下shell命令:
PS C:\Windows\system32> wmic
wmic:root\cli> /user: zuka
Please enter the password:blah
wmic:root\cli> /node: {IP-Address of my DesktopPC}
wmic:root\cli> csproduct get /value
Node - {IP-Address of my DesktopPC}
Error:
Description = Access is denied.
或者:
get-wmiobject CIM_Memory -computername desktopPC { or IP } -credential zuka
我得到一个错误消息,如:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
我尝试通过以下步骤解决问题:(但它们都没有工作:[]
-
进入secpol.msc并更改了网络访问权限:本地帐户的共享和安全模型为 Classic - local users authenticate as themselfes .
-
我还在secpol.msc网络安全LAN Manager身份验证级别更改为 Send LM & NTLM responses, use NTLMv2 session security if negotiated .
-
在compmgmt.msc>服务和应用程序> WMI-control> register "security"> expand root&selected CIMV2 看到本地管理员可以完全访问此命名空间 . Zuka是本地管理员组的成员 .
Windows 10是否存在特定问题,或者我是否错过了某种配置?
2 回答
除非您在家中设置了域,否则看起来您传递的是不正确的凭据 . 用户应该在它前面有一个机器限定符 . 所以“/ user:desktopPC \ zuka”
在同一域或任何域中启用其他PC 's on WMI, it is needed to add the hosts into the trustedhost-list in winrm, if the computers aren'的远程访问 .
检查winrm是否正在运行或停止:
如果已停止,请键入:
添加对远程主机的访问权限 .
所以在我的情况下:
要验证winrm服务,您可以键入:
它将提供服务的当前状态,如果需要,它将配置WinRM服务 .
不幸的是,Windows防火墙阻止了远程访问 .
使用高级安全性>入站规则模式进入Windows防火墙
在工作区中单击鼠标右键,然后选择“新建规则”...
选择预定义选项,从下拉列表中选择Windows Management Instrumentation(WMI),然后单击“下一步” .
现在选择具有本地配置文件值的选项:(WMI-In)规则 .
允许连接>完成 .
现在,我可以使用以下命令行从我的laptopPC访问WMI到我的desktopPC:
然后它要求输入密码 . 瞧!我得到了记忆的信息,进行了远程访问 . =)