none
WMI Issue with Windows 2008 Servers

    Question

  • I have two DC's running windows 2008 R2 , DC1 with FSMO and DC2. Also have two Windows 2003 Server and a number of other Windows 2008 R2 Servers.

    On DC2 WMI connections work fine , but On DC1 if you try and connect from another Windows 2008 R2 server it fails. It however works if you connect to WMI port from a Windows 2003 Server.

    Checked firewall settings - seems fine. I can telnet to port 135 on DC1 from a all servers

    Any help would be appreciated.

    Tuesday, December 20, 2011 2:04 AM

Answers

  • Hi,

     

    I would like to suggest you run the following commands to re-register WMI components to check the result:

     

    Regsvr32 %SystemRoot%\System32\wbem\wmidcprv.dll

    cd /d %windir%\system32\wbem

    for %i in (*.dll) do RegSvr32 -s %i

    for %i in (*.exe) do %i /RegServer

     

    The Windows Management Instrumentation Tester window may appear, this is normal and we can go ahead to close it.

     

    If it does not work, I also suggest you run the following commands to repair WMI namespace:

     

    net stop winmgmt

    wmic /NAMESPACE:\\root path "__namespace.name='wmi'" delete

    mofcomp %windir%\system32\wbem\wmi.mof

    net start winmgmt

     

    After that, please restart the computer to check the result.

     

    Regards,

     

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Arthur Li

    TechNet Community Support

    Wednesday, December 21, 2011 1:56 AM
  • Hi,

     

    According to the log file, there are a lot of “Access denied” errors.

     

    Would you please try to use an administrator account and right click on Command Prompt and select Run as an administrator? After that, please run the commands I provided again to check the result.

     

    If the issue persists, you may also run the command, SFC/ScanNow to scan and repair the system files.

     

    Regards,

     

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Arthur Li

    TechNet Community Support

    Tuesday, December 27, 2011 6:22 AM

All replies

  • http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/8ed26d46-9994-4052-a307-5b071805aea8

     

    repair the wmi repository.

     

    or see http://support.microsoft.com/kb/2464876

    if it meets the criteria. 

     

    Josh


    Tuesday, December 20, 2011 2:20 AM
  • Hi,

     

    I would like to suggest you run the following commands to re-register WMI components to check the result:

     

    Regsvr32 %SystemRoot%\System32\wbem\wmidcprv.dll

    cd /d %windir%\system32\wbem

    for %i in (*.dll) do RegSvr32 -s %i

    for %i in (*.exe) do %i /RegServer

     

    The Windows Management Instrumentation Tester window may appear, this is normal and we can go ahead to close it.

     

    If it does not work, I also suggest you run the following commands to repair WMI namespace:

     

    net stop winmgmt

    wmic /NAMESPACE:\\root path "__namespace.name='wmi'" delete

    mofcomp %windir%\system32\wbem\wmi.mof

    net start winmgmt

     

    After that, please restart the computer to check the result.

     

    Regards,

     

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Arthur Li

    TechNet Community Support

    Wednesday, December 21, 2011 1:56 AM
  • I have triedboth suggestions above but still have the same issue, although at atages I get Access Denied

    Here is a log dump

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

    C:\Users\administrator>winmgmt /salvagerepository %windir%\system32\wbem
    WMI repository verification failed
    Error code:     0x80041003
    Facility:       WMI
    Description:    Access denied


    C:\Users\administrator>winmgmt /salvagerepository %windir%\system32\wbem
    WMI repository verification failed
    Error code:     0x80070005
    Facility:       Win32
    Description:    Access is denied.


    C:\Users\administrator>winmgmt /salvagerepository %windir%\system32\wbem
    WMI repository verification failed
    Error code:     0x80070005
    Facility:       Win32
    Description:    Access is denied.


    C:\Users\administrator>winmgmt /salvagerepository %windir%\system32\wbem
    WMI repository verification failed
    Error code:     0x80070005
    Facility:       Win32
    Description:    Access is denied.


    C:\Users\administrator>winmgmt /resetrepository %windir%\system32\wbem
    WMI repository reset failed
    Error code:     0x80070005
    Facility:       Win32
    Description:    Access is denied.


    C:\Users\administrator>Regsvr32 %SystemRoot%\System32\wbem\wmidcprv.dll

    C:\Users\administrator>
    C:\Users\administrator>winmgmt /salvagerepository %windir%\system32\wbem
    WMI repository verification failed
    Error code:     0x80070005
    Facility:       Win32
    Description:    Access is denied.


    C:\Users\administrator>winmgmt /resetrepository %windir%\system32\wbem
    WMI repository reset failed
    Error code:     0x80070005
    Facility:       Win32
    Description:    Access is denied.


    C:\Users\administrator>Regsvr32 %SystemRoot%\System32\wbem\wmidcprv.dll

    C:\Users\administrator>Regsvr32 %SystemRoot%\System32\wbem\wmidcprv.dll

    C:\Users\administrator>cd /d %windrir%\system32\wbem
    The system cannot find the path specified.

    C:\Users\administrator>cd /d %windir%\system32\wbem

    C:\Windows\System32\wbem>for %i in (*.dll) do RegSvr32 -s %i

    C:\Windows\System32\wbem>RegSvr32 -s cimwin32.dll

    C:\Windows\System32\wbem>RegSvr32 -s dnsprov.dll

    C:\Windows\System32\wbem>RegSvr32 -s dsprov.dll

    C:\Windows\System32\wbem>RegSvr32 -s esscli.dll

    C:\Windows\System32\wbem>RegSvr32 -s fastprox.dll

    C:\Windows\System32\wbem>RegSvr32 -s ipmiprr.dll

    C:\Windows\System32\wbem>RegSvr32 -s ipmiprv.dll

    C:\Windows\System32\wbem>RegSvr32 -s KrnlProv.dll

    C:\Windows\System32\wbem>RegSvr32 -s MMFUtil.dll

    C:\Windows\System32\wbem>RegSvr32 -s mofd.dll

    C:\Windows\System32\wbem>RegSvr32 -s mofinstall.dll

    C:\Windows\System32\wbem>RegSvr32 -s msiprov.dll

    C:\Windows\System32\wbem>RegSvr32 -s NCProv.dll

    C:\Windows\System32\wbem>RegSvr32 -s ntevt.dll

    C:\Windows\System32\wbem>RegSvr32 -s PolicMan.dll

    C:\Windows\System32\wbem>RegSvr32 -s RacWmiProv.dll

    C:\Windows\System32\wbem>RegSvr32 -s repdrvfs.dll

    C:\Windows\System32\wbem>RegSvr32 -s ServDeps.dll

    C:\Windows\System32\wbem>RegSvr32 -s servercompprov.dll

    C:\Windows\System32\wbem>RegSvr32 -s SMTPCons.dll

    C:\Windows\System32\wbem>RegSvr32 -s stdprov.dll

    C:\Windows\System32\wbem>RegSvr32 -s vdswmi.dll

    C:\Windows\System32\wbem>RegSvr32 -s viewprov.dll

    C:\Windows\System32\wbem>RegSvr32 -s vsswmi.dll

    C:\Windows\System32\wbem>RegSvr32 -s wbemcntl.dll

    C:\Windows\System32\wbem>RegSvr32 -s wbemcons.dll

    C:\Windows\System32\wbem>RegSvr32 -s wbemcore.dll

    C:\Windows\System32\wbem>RegSvr32 -s wbemdisp.dll

    C:\Windows\System32\wbem>RegSvr32 -s wbemess.dll

    C:\Windows\System32\wbem>RegSvr32 -s wbemprox.dll

    C:\Windows\System32\wbem>RegSvr32 -s wbemsvc.dll

    C:\Windows\System32\wbem>RegSvr32 -s Win32_Tpm.dll

    C:\Windows\System32\wbem>RegSvr32 -s WinMgmtR.dll

    C:\Windows\System32\wbem>RegSvr32 -s WmiApRes.dll

    C:\Windows\System32\wbem>RegSvr32 -s WmiApRpl.dll

    C:\Windows\System32\wbem>RegSvr32 -s WMICOOKR.dll

    C:\Windows\System32\wbem>RegSvr32 -s WmiDcPrv.dll

    C:\Windows\System32\wbem>RegSvr32 -s wmipcima.dll

    C:\Windows\System32\wbem>RegSvr32 -s wmipdfs.dll

    C:\Windows\System32\wbem>RegSvr32 -s wmipdskq.dll

    C:\Windows\System32\wbem>RegSvr32 -s WmiPerfClass.dll

    C:\Windows\System32\wbem>RegSvr32 -s WmiPerfInst.dll

    C:\Windows\System32\wbem>RegSvr32 -s WMIPICMP.dll

    C:\Windows\System32\wbem>RegSvr32 -s WMIPIPRT.dll

    C:\Windows\System32\wbem>RegSvr32 -s WMIPJOBJ.dll

    C:\Windows\System32\wbem>RegSvr32 -s wmiprov.dll

    C:\Windows\System32\wbem>RegSvr32 -s WmiPrvSD.dll

    C:\Windows\System32\wbem>RegSvr32 -s WMIPSESS.dll

    C:\Windows\System32\wbem>RegSvr32 -s WMIsvc.dll

    C:\Windows\System32\wbem>RegSvr32 -s wmitimep.dll

    C:\Windows\System32\wbem>RegSvr32 -s wmiutils.dll

    C:\Windows\System32\wbem>for %i in (*.exe) do %i /Regserver

    C:\Windows\System32\wbem>mofcomp.exe /Regserver
    Microsoft (R) MOF Compiler Version 6.1.7600.16385
    Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
    File '/Regserver' not found!

    C:\Windows\System32\wbem>scrcons.exe /Regserver

    C:\Windows\System32\wbem>unsecapp.exe /Regserver

    C:\Windows\System32\wbem>wbemtest.exe /Regserver

    C:\Windows\System32\wbem>WinMgmt.exe /Regserver
    Invalid parameter

    Windows Management Instrumentation

    Usage:  winmgmt [/backup <filename>] [/restore <filename> <flag>]
                    [/resyncperf] [/standalonehost [<level>]] [/sharedhost]
                    [/verifyrepository [<path>]] [/salvagerepository]
                    [/resetrepository]

    /backup <filename>
            Causes WMI to back up the repository to the specified file name. The
            filename argument should contain the full path to the file location.
            This process requires a write lock on the repository so that write
            operations to the repository are suspended until the backup process is
            completed.

    /restore <filename> <flag>
            Manually restores the WMI repository from the specified backup file.
            The filename argument should contain the full path to the backup file
            location. To perform the restore operation, WMI saves the existing
            repository to write back if the operation fails. Then the repository is
            restored from the backup file that is specified in the filename
            argument. If exclusive access to the repository cannot be achieved,
            existing clients are disconnected from WMI. The flag argument must be a
            1 (force - disconnect users and restore) or 0 (default - restore if no
            users connected) and specifies the restore mode.

    /resyncperf
            Registers the system performance libraries with WMI.

    /standalonehost [<level>]
            Moves the Winmgmt service to a standalone Svchost process that has a
            fixed DCOM endpoint. The default endpoint is "ncacn_ip_tcp.0.24158".
            However, the endpoint may be changed by running Dcomcnfg.exe. The level
            argument is the authentication level for the Svchost process. If level
            is not specified, the default is 4 (RPC_C_AUTHN_LEVEL_PKT).

    /sharedhost
            Moves the Winmgmt service into the shared Svchost process.

    /verifyrepository [<path>]
            Performs a consistency check on the WMI repository. When you add the
            /verifyrepository switch without the <path> argument, then the live
            repository currently used by WMI is verified. When you specify the path
            argument, you can verify any saved copy of the repository. In this
            case, the path argument should contain the full path to the saved
            repository copy. The saved repository should be a copy of the entire
            repository folder.

    /salvagerepository
            Performs a consistency check on the WMI repository, and if an
            inconsistency is detected, rebuilds the repository.  The content of the
            inconsistent repository is merged into the rebuilt repository, if it
            can be read. The salvage operation always works with the repository
            that the WMI service is currently using. MOF files that contain the
            #pragma autorecover preprocessor statement are restored to the
            repository.

    /resetrepository
            The repository is reset to the initial state when the operating system
            is first installed. MOF files that contain the #pragma autorecover
            preprocessor statement are restored to the repository.


    C:\Windows\System32\wbem>WMIADAP.exe /Regserver

    C:\Windows\System32\wbem>WmiApSrv.exe /Regserver

    C:\Windows\System32\wbem>WMIC.exe /Regserver
    Invalid Global Switch.

    C:\Windows\System32\wbem>WmiPrvSE.exe /Regserver

    C:\Windows\System32\wbem>net stop winmgmt
    System error 5 has occurred.

    Access is denied.


    C:\Windows\System32\wbem>wmic
    wmic:root\cli>/DC1:\\root path "_QSRDC!.name="wmi" delete
    Invalid Global Switch.
    wmic:root\cli>/DC1:\\root path "_DC1.name="wmi" delete
    Invalid Global Switch.
    wmic:root\cli>DC1:\\root path "_DC1.name="wmi" delete
    DC1:\\root - Alias not found.
    wmic:root\cli>exit

    C:\Windows\System32\wbem>wmic /NAMESPACE:\\root path "__namespace.name='wmi'" de
    lete
    Deleting instance \\DC1\ROOT:__NAMESPACE.Name="WMI"
    ERROR:
    Description = Access denied

    C:\Windows\System32\wbem>

     

    Thursday, December 22, 2011 5:26 AM
  • Hi,

     

    According to the log file, there are a lot of “Access denied” errors.

     

    Would you please try to use an administrator account and right click on Command Prompt and select Run as an administrator? After that, please run the commands I provided again to check the result.

     

    If the issue persists, you may also run the command, SFC/ScanNow to scan and repair the system files.

     

    Regards,

     

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Arthur Li

    TechNet Community Support

    Tuesday, December 27, 2011 6:22 AM
  • Hi,

     

    I would like to confirm what is the current situation? If there is anything that I can do for you, please do not hesitate to let me know, and I will be happy to help.

     

    Regards,

     

    Arthur Li

    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.


    Arthur Li

    TechNet Community Support

    Thursday, December 29, 2011 3:07 AM