我正在尝试在以工作组模式运行的 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
Run Code Online (Sandbox Code Playgroud)
我以管理员组的成员身份登录,并以管理员身份运行控制台。
小智 13
刚刚在几个系统上遇到并解决了这个问题。在这种特殊情况下,这两个系统不是域的一部分,用户帐户不是原始的“管理员”帐户,而是一个较新的帐户,也是本地管理员组的成员。
解决方案来自我浏览的以下博客文章:WinRM Access is Denied on Local Computer。简而言之,从命令提示符(以管理员身份启动)运行以下命令:
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
Run Code Online (Sandbox Code Playgroud)
之后,以 admin 身份重新启动 PowerShell 提示符并重新运行Enable-PSRemoting
,就这么简单。
我最近在尝试在 Windows 2008 R2 的托管版本上启用 PSRemoting 时遇到了同样的错误Access is denied。
我发现我的托管公司在防火墙规则上应用了组策略,在尝试启用 PSRemoting 时在第 4 步中修改了该规则:
4. 为 WS-Management 流量启用防火墙例外(仅适用于 http)
修复步骤:
1)点击开始菜单>>管理工具>>Windows防火墙和高级安全
2)点击入站规则>>新规则>>选择“预定义”选项并从下拉列表中选择Windows远程管理>>点击下一步
3)现在,取消选择 Windows 远程管理兼容模式 (HTTP-In) 并选择 Windows 远程管理模式 (HTTP-In) >> 单击下一步 >> 允许连接 >> 完成
这是调试此操作的有用资源列表,
我在发现上述修复之前使用过的:
故障排除参考:
检查您的帐户是否在本地管理员组中:
powershell> whoami /all
Run Code Online (Sandbox Code Playgroud)
Powershell 团队 - 启用 PSRemoting(4 个常见故障排除步骤)
如何在远程计算机上运行 powershell 命令(域与工作组设置)
其他主题:
尝试在 SharePoint 上设置 PSRemoting?
使用 PowerShell 远程处理技术管理 SharePoint 场
尝试在 Windows XP 上设置 PSRemoting?
在 Windows XP SP3 中启用 PSRemoting 时出错
您是否在非英语计算机上设置 PSRemoting?- 将其更改为英语
参考 1 - 语言未指定
参考 2 - 西班牙语/德语
您是否正在使用 VirtualBox 并尝试设置 PSRemoting?
Virtualbox 并需要启用启用 CredSSP
VirtualBox 并设置 PSRemoting 获取访问被拒绝错误
归档时间: |
|
查看次数: |
71371 次 |
最近记录: |