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

2024-08-30 17:04:47 浏览数 (3)

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_MACHINESoftwarePoliciesMicrosoftWindowsWinRM

powershell:reg delete "HKLMSOFTWAREPoliciesMicrosoftWindowsWinRM" /f 2>&1 >$null

cmd:reg delete "HKLMSOFTWAREPoliciesMicrosoftWindowsWinRM" /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相关的命令就不报错了。

0 人点赞