【发布时间】:2017-09-30 07:32:53
【问题描述】:
我正在尝试从我的 Linux 工作站远程连接到 Windows 机器。
我在 Arch Linux 工作站上安装了 powershell,目前正在尝试连接到主机。
在主机上:
Enable-PSRemoting
然后允许所有主机
Set-Item wsman:\localhost\client\trustedhosts *
检查所有内容:
PS C:\windows\system32> ls WSMan:\localhost\shell
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Shell
Type Name SourceOfValue Value
---- ---- ------------- -----
System.String AllowRemoteShellAccess true
System.String IdleTimeout 7200000
System.String MaxConcurrentUsers 2147483647
System.String MaxShellRunTime 2147483647
System.String MaxProcessesPerShell 2147483647
System.String MaxMemoryPerShellMB 2147483647
System.String MaxShellsPerUser 2147483647
现在当我尝试从 Linux 工作站连接时:
PS /home/user/tmp> Enter-PSSession -ComputerName "myuser" -Credential DOMAIN\myuser
Windows PowerShell credential request
Enter your credentials.
Password for user DOMAIN\myuser: *****************
Enter-PSSession : MI_RESULT_ACCESS_DENIED
At line:1 char:1
+ Enter-PSSession -ComputerName "myuser" -Credential DOMAIN\ajpalhare ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (myuser:String) [Enter-PSSession
], PSInvalidOperationException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
我在 winrm Windows 事件日志中没有任何内容。
欢迎任何建议,
【问题讨论】:
标签: linux powershell windows-10 remote-access