前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >winrm quickconfig unable to check the status of the firewall 2147024894 80070002

winrm quickconfig unable to check the status of the firewall 2147024894 80070002

原创
作者头像
Windows技术交流
修改2022-07-11 16:13:29
8960
修改2022-07-11 16:13:29
举报
文章被收录于专栏:Windows技术交流Windows技术交流

2008R2执行winrm quickconfig报错unable to check the status of the firewall

Error number:-21470248940x80070002

代码语言:javascript
复制
PS H:\> winrm quickconfig
WinRM already is set up to receive requests on this machine.
WSManFault
    Message
        ProviderFault
            WSManFault
                Message = Unable to check the status of the firewall.

Error number:  -2147024894 0x80070002
The system cannot find the file specified.

虽然报错了,但是我测试使用winrm远程访问机器一切正常,既然报防火墙了,我看防火墙功能一切正常,要不我把windows firewall服务关闭下吧,powershell 执行 stop-service mpssvc 2>&1 >$null 即可(NT10.0的系统不允许调用命令关闭防火墙服务,nt6的系统比如2008R2/2012R2可以),关闭防火墙服务后,执行winrm quickconfig竟然不报错了

这让我不由得怀疑是不是微软的bug,上网一查资料,果然是bug,需要安装对应补丁KB2697738,但是2008R2已于2020.1.14到期,微软不支持,连对应的补丁资料也下掉了,我想下载个KB2697738的安装包都办不到,不过没关系,微软的补丁一般都是迭代的,安装后续的补丁应该也能行。

这个补丁是2012.9.12出的,保守点,我打全补丁打到2020.1.14总该没问题了吧

我是怎么知道这个补丁是2012年9月的,一般有2个网站

http://www.windows-update-checker.com/

②http://www.catalog.update.microsoft.com/Search.aspx

例如http://www.catalog.update.microsoft.com/Search.aspx?q=KB4103723

知道KB号就可以拼接网址

③http://support.microsoft.com/en-in/kb/2697738

这个也是知道KB号就可以拼接网址(一些KB资料被微软下掉了,也许你网址拼接对了,但是访问时是404)

KB-work

Dateadded

Link to  KB-Article

Link toupdate/hotfix

Type

KUC-Type

Win7 x64

Title

Description

Client

Server

2697738

2012.09.12

KB2697738

2697738

x

"Unable to check the status of the firewall" error message when you run the "Enable-PSRemoting -force" PowerShell command on a Windows 7-based or Windows Server 2008 R2-based computer that uses Czech as the display language

Fixes an issue in which you receive an "Unable to check the status of the firewall" error message on a computer that uses Czech as the display language. This issue occurs when you run the "Enable-PSRemoting -force" PowerShell command in Windows 7 or in...

x

x

参考https://social.technet.microsoft.com/Forums/systemcenter/en-US/75edbae2-d260-4a10-abbe-1bcf9d819c0a/winrm-error?forum=virtualmachinemanager

https://www.cnblogs.com/pengyusong/p/7678263.html

http://windows-update-checker.com/Lists/Win7x64.htm

在一开始没查到是bug的时候,我查到了一些误导人的资料,执行那些资料后,出问题,原本功能正常的winrm连5985端口都不监听了,我当时在参考一个文档配置了winrm组策略,产生了一些注册表键值,删掉这个路径的注册表就正常了

Registry Path:HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WinRM

powershell:reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WinRM" /f 2>&1 >$null

cmd:reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WinRM" /f 2>&1 >nul

2008R2执行winrm quickconfig报错unable to check the status of the firewall (Error number:-2147024894 0x80070002 )的问题解决后,又遇到了一个问题,执行winrm相关的命令,都报

Access is denied.

Error number: -2147024891 0x80070005

例如

winrm quickconfig

代码语言:javascript
复制
PS C:\> winrm quickconfig
WinRM already is set up to receive requests on this machine.
WSManFault
    Message = Access is denied.

Error number:  -2147024891 0x80070005

winrm enumerate winrm/config/listener

代码语言:javascript
复制
PS C:\>  winrm enumerate winrm/config/listener
WSManFault
    Message = Access is denied.

Error number:  -2147024891 0x80070005
Access is denied.

查了资料,验证存在空密码账户导致的问题(我执行了sysprep,Administrator密码变成了空密码),于是执行net user Administrator "密码" 设置密码后再执行winrm相关的命令就不报错了。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云服务器
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档