WMI exception occurred on Server ' ' : access is denied (Exception from HRESULT:0x80070005(EACCESSDENIED))

Ardan Zaki 236 Reputation points
2023-03-27T08:27:52.8566667+00:00

Hi, I currently installed new exchange server on my DRC site, I have exchange server 2016 on my DC and exchange server 2019 on my DRC.

the problem is, my exchange server on DC site (2016) cannot communicate through Windows to exchange server on DRC site (2019), I tested with "get-wmiobject win32_computersystem -computername" and it's showing error message = "Management Instrumentation (WMI) with error : WMI exception occurred on Server ' ' : access is denied (Exception from HRESULT:0x80070005(EACCESSDENIED))".

But when I tried tested the same script from exchange server DRC Site (2019) to exchange server DC Site (2016), it resolved.

I've tried to checked the permission and firewall and match with all server, but the error is still showing.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,171 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,357 questions
0 comments No comments
{count} votes

Accepted answer
  1. Aholic Liang-MSFT 13,741 Reputation points Microsoft Vendor
    2023-03-30T09:50:39.2066667+00:00

    Hi @ Ardan Zaki

    I have resolved the issue

    Great to know that you've already got of a solution and really appreciate it for your sharing!
    By the way, since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others.". and according to the scenario introduced here: Answering your own questions on Microsoft Q&A, I would make a brief summary of this thread:

    [WMI exception occurred on Server ' ' : access is denied (Exception from HRESULT:0x80070005(EACCESSDENIED))]

    Issue Symptom:

    the problem is, my exchange server on DC site (2016) cannot communicate through Windows to exchange server on DRC site (2019), I tested with "get-wmiobject win32_computersystem -computername" and it's showing error message = "Management Instrumentation (WMI) with error : WMI exception occurred on Server ' ' : access is denied (Exception from HRESULT:0x80070005(EACCESSDENIED))".

    But when I tried tested the same script from exchange server DRC Site (2019) to exchange server DC Site (2016), it resolved.

     

    The solution:

    Update all Exchange servers in the environment to the latest cumulative update and then try again.

     


     

    You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks for your understanding!

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Ardan Zaki 236 Reputation points
    2023-03-30T08:57:06.1766667+00:00

    Hi, thank you for your all responses.

    I have resolved the issue, turnout the servers on the DC site is not up to date and I update all DC Server (2016) with latest CU and the problem resolved.

    1 person found this answer helpful.
    0 comments No comments

  2. Robert Marsico 0 Reputation points
    2023-03-27T15:51:46.3466667+00:00

    It seems like there may be some issues with permissions or firewall settings preventing the communication between the Exchange servers. Here are a few things you can try:

    1. Make sure that the appropriate firewall ports are open between the two sites. Exchange uses several ports for communication, so you may need to open multiple ports. Microsoft provides a list of the required ports for Exchange Server here: https://docs.microsoft.com/en-us/exchange/plan-and-deploy/deploy-new-installations/firewall-ports
    2. Check the permissions on the Exchange servers. Make sure that the accounts you are using to run the scripts have the appropriate permissions to access WMI on both servers. You may need to add the accounts to the local Administrators group on both servers.
    3. Make sure that both servers are running the same version of PowerShell. If one server is running an older version of PowerShell, it may not be able to communicate with the newer server.
    4. Try running the PowerShell script with elevated privileges. Right-click on PowerShell and select "Run as administrator" before running the script.
    5. Check the Event Viewer on both servers for any error messages related to WMI or PowerShell. These may provide additional information about the cause of the issue.

    I hope these suggestions help you resolve the issue.


  3. Aholic Liang-MSFT 13,741 Reputation points Microsoft Vendor
    2023-03-28T09:55:17.33+00:00

    Hi @ Ardan Zaki

    Please refer to the following steps to compare whether the permissions of the two servers are the same:

    1. Enter Dcomcnfg in the search box in the lower left corner to open Component services.
    2. Right-click My Computer > Properties. Under COM Security, click Edit Restrictions for both sections.
    3. Check whether remote access, remote launch, and remote activation are provided for Users.

    Here is a troubleshooting article about WMI Access Denied for your reference:WMI Troubleshooting - Win32 apps | Microsoft Learn

    2023-3-28-2

    In addition , in my tests, when I remove the permissions related to the Administrators Group, I get a similar error when using the get-winobject command in DC:

    2023-3-28-3

     

    2023-3-28-4

     

    Hope the above suggestions are helpful to you!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.