【发布时间】:2017-10-12 09:55:31
【问题描述】:
我正在尝试使用:
Enter-PSSession -ComputerName 10.10.10.5 -Credential administrator
这给了我:
Enter-PSSession : MI_RESULT_ACCESS_DENIED
At line:1 char:1
+ Enter-PSSession -ComputerName 10.10.10.5 -Credential administrator ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (10.10.10.5:String) [Enter-PSSession], PSInvalidOperationException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
Ansible 同时工作没有问题:
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/setup.ps1
<10.10.10.5> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 10.10.10.5
<10.10.10.5> WINRM CONNECT: transport=ssl endpoint=https://10.10.10:5986/wsman
<10.10.10.5> WINRM OPEN SHELL: 5001549B-C9A9-41FF-B9A3-8D19155EE123
EXEC (via pipeline wrapper)
<10.10.10.5> WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-']
<10.10.10.5> WINRM RESULT u'<Response code 1, out "{"changed":false,"an", err "\r\n">'
<10.10.10.5> WINRM CLOSE SHELL: 5001549B-C9A9-41FF-B9A3-8D19155EE123
有什么方法可以调试吗?
【问题讨论】:
-
-ComputerName 正在寻找一个字符串。试试 Enter-PSSession -ComputerName '10.10.10.5' -Credential administrator
标签: linux powershell ubuntu core