启用Powershell远程,访问被拒绝?

我试图启用Windows 2008 R2服务器上运行的工作组模式下的Powershell远程处理。

我在PowerShell控制台中运行了命令Enable-PSRemoting。

PS C:\Windows\system32> Enable-PSRemoting WinRM Quick Configuration Running command "Set-WSManQuickConfig" to enable this machine for remote management through WinRM service This includes: 1. Starting or restarting (if already started) the WinRM service 2. Setting the WinRM service type to auto start 3. Creating a listener to accept requests on any IP address 4. Enabling firewall exception for WS-Management traffic (for http only). Do you want to continue? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y WinRM already is set up to receive requests on this machine. Set-WSManQuickConfig : Access is denied. At line:50 char:33 + Set-WSManQuickConfig <<<< -force + CategoryInfo : InvalidOperation: (:) [Set-WSManQuickConfig], InvalidOperationException + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand 

我以pipe理员组的成员身份login,并以pipe理员身份运行控制台。

对于Power Shell Remoting的任何问题,有两个重要的资源。

首先是关于help about_Remote_Troubleshooting ,这是一个广泛的参考。

第二个是互联网search你得到的错误。 我发现了一个PowerShell团队的博客文章有这个清单:

  1. 我的机器连接到域。
  2. 我以pipe理员身份login
  3. PowerShell启动提升。
  4. 我的密码不是空白的

其中一个解决您的问题?

我最近有同样的错误访问被拒绝 ,同时尝试启用托pipe版本的Windows 2008 R2上的PSRemoting。

我发现我的托pipe公司已经对防火墙规则应用了组策略,在尝试启用PSRemoting时,在第4步中修改了该规则:
4.为WS-Management通信启用防火墙例外(仅限http)

步骤来解决:
1)点击开始菜单>>pipe理工具>> Windows防火墙和高级安全

2)点击入站规则>>新规则>>select“预定义”选项,并从下拉列表中selectWindows远程pipe理>>点击下一步

3)现在,取消selectWindows远程pipe理兼容模式(HTTP-In)并selectWindows远程pipe理模式(HTTP-In)>>单击下一步>>允许连接>>完成

这里有一个有用的资源清单,用于debugging,我发现上述修复之前,我用它:

疑难解答参考文献:
检查您的帐户是否在本地pipe理员组中:

 powershell> whoami /all 

PowerShell团队 – 启用PSRemoting (4个常见故障排除步骤)
如何在远程计算机上运行powershell命令 (域vs工作组设置)

其他主题:
试图在SharePoint上设置PSRemoting?
使用PowerShell远程处理技术来pipe理SharePoint场

试图在Windows XP上设置PSRemoting?
在Windows XP SP3中启用PSRemoting时出错

你是否在非英语的电脑上设置PSRemoting? – 把它改成英文
参考1 – lanuage没有指定
参考2 – 西class牙文/德文

您是否使用VirtualBox并尝试设置PSRemoting?
Virtualbox并需要启用启用CredSSP
VirtualBox和设置PSRemoting获取访问被拒绝的错误

刚刚遇到并在一些系统上解决了这个问题。 在这种特殊情况下,这两个系统不是域的一部分,用户帐户不是原始的“pipe理员”帐户,而是一个较新的帐户,也是本地pipe理员组的成员。

该解决scheme来自以下博客文章,我漫步: WinRM访问被拒绝在本地计算机上 。 简而言之,从命令提示符(以pipe理员身份启动)运行以下命令:

 reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f 

之后,以pipe理员身份重新启动PowerShell提示符并重新运行Enable-PSRemoting ,这很简单。

我在Win 7中closures了UAC,重新启动并运行。

编辑:不build议你离开UACclosures。 我有这个问题,没有一个空白的密码。 原来是我唯一的解决办法。 只要命令成功就把它重新打开。 哗众取宠。 大声笑