Powershell 远程连接故障-访问被拒绝
我想从我的机器连接到带有PowerShell的远程机器,并在远程机器上执行脚本。我的计算机(Windows10)和远程计算机(Windows Server 2008R2)位于同一网络上,但不在同一域中。以下是我所做的: 我启用了WinRM,并将其配置为允许在我的计算机和远程计算机上进行未加密和基本身份验证。Powershell 远程连接故障-访问被拒绝,powershell,remote-access,windows-server-2008-r2,Powershell,Remote Access,Windows Server 2008 R2,我想从我的机器连接到带有PowerShell的远程机器,并在远程机器上执行脚本。我的计算机(Windows10)和远程计算机(Windows Server 2008R2)位于同一网络上,但不在同一域中。以下是我所做的: 我启用了WinRM,并将其配置为允许在我的计算机和远程计算机上进行未加密和基本身份验证。winrm g winrm/config的输出: 在我的机器上: 在远程计算机上: 命令是(Enter PSSession): 错误是: Enter-PSSession : La co
winrm g winrm/config
的输出:
- 在我的机器上:
- 在远程计算机上:
Enter PSSession
):
错误是:
Enter-PSSession : La connexion au serveur distant remotemachine a échoué avec
le message d’erreur suivant : Accès refusé. Pour plus d'informations, voir la
rubrique d'aide about_Remote_Troubleshooting.
Au caractère Ligne:1 : 1
+ Enter-PSSession -ComputerName remotemachine -Credential $credentials ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument : (remotemachine:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
进入PSSession:La connexion au serveur remotemachine aéchouéavec
我的消息是:Accès refusé。倒加信息,瞧
rubrique d'aide关于远程故障排除。
黄金黄金价格:1:1
+输入PSSession-ComputerName remotemachine-Credential$凭据。。。
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CategoryInfo:InvalidArgument:(remotemachine:String)[输入PSSession],PSRemotingTransportException
+FullyQualifiedErrorId:CreateRemoteRunspace失败
也就是说:
与远程服务器remotemachine的连接失败,错误消息如下:访问被拒绝。有关详细信息,请参阅有关远程故障排除的帮助主题
您好,Fourat,您是远程计算机上的管理员吗?@Neossian是用户
remotemachine\user
对远程计算机具有管理员权限。如果您不提及身份验证类型,该怎么办。仅使用此选项:输入PSSession-ComputerName remotemachine-Credential$credentials
@rohindhart奇怪的是,它能工作,你能告诉我为什么即使激活了基本身份验证也不能工作吗?我不是专家,但我认为基本身份验证需要不同格式的凭证。
Enter-PSSession : La connexion au serveur distant remotemachine a échoué avec
le message d’erreur suivant : Accès refusé. Pour plus d'informations, voir la
rubrique d'aide about_Remote_Troubleshooting.
Au caractère Ligne:1 : 1
+ Enter-PSSession -ComputerName remotemachine -Credential $credentials ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument : (remotemachine:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed