Windows Server error "Access is denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"DescriptionThe Windows Server error "Access is denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" is returned when running a Discovery, Orchestration, or IntegrationHub step. This article contains a list of issues and resolutions that SN support has come across while troubleshooting "Access is denied" errors. An environment configured to allow communication between the MID server and the target server, and a credential with the necessary rights, are prerequisites in order for Powershell probes to execute successfully. It is often necessary to reach out to the windows team managing the target server to resolve such access issues.CauseIncorrect credentials configured for target Windows ServerThe credential used for the discovery of this Windows Server does not contain the domain nameCredential permissionsWindows Management Instrumentation (WMI) is disabled or not configured properly on the target Windows ServerWMI permissionsWMI-related service or services are disabledEnableDCOM registry entry that controls the global activation and call policies is disable either on the MID Server or on the target Windows Server.Execution policy on target server does not allow scripts to be runTarget server does not allow remote executionResolutionIncorrect credentials configured for target Windows Server Verify that the user name and password for the Windows Server are correct: Log in to the Windows Server that you must discover using a remote desktop connection.If you fail to connect, the username and password for this Windows Server are wrong. Find out the correct credentials and configure them as described in the Service Mapping documentation. If you connect successfully, continue with this troubleshooting procedure. The credential used for the discovery of this Windows Server does not contain the domain name Perform the following steps: Navigate to MID Server > Credentials.Click the Windows credentials configured for the Windows Server you failed to access.Check that the Windows Server credentials contain the domain name. The domain name appears in front of the user name and is separated with blackslash (\). 4. If not, add the relevant domain name to the credentials. Use the domain name which allows you to access this Windows Server. Credential permissions For information on permissions, review the following documentation: Windows credentialsWindows probes and permissions Windows Management Instrumentation (WMI) is disabled or not configured properly on the target Windows Server Check that Windows Management Instrumentation (WMI) is enabled by performing the following steps: On the Windows Server, navigate to Start > Run.Enter wbemtest.Check that the Windows Management Instrumentation Tester application starts. If it does, WMI is enabled.In the Windows Management Instrumentation Tester window, click Connect.In the Connect window, leave the default values for Namespace and Credentials and click Connect.Click Query.In the Query window, enter the following WMI query: Select * from Win32_ComputerSystem and click Apply.Verify that you get a reply with the computer name. WMI permissions Ensure that all WMI-related services can be started on-demand: In the Windows Explorer, navigate to Server Manager.In the tree, select Configuration, right-click WMI Control, and select Properties.In the WMI Control Properties window, click Security.Click the Root folder and click Security.In the Security for Root window, click Advanced.In the Advanced Security Settings for Root window, double-click Administrators.In the Permission Entry for Root window, verify that all checkboxes are selected. WMI-related service or services are disabled In the Server Manager, select Configuration > Services and verify that the status for the following services is not disabled: Remote Access Auto Connection ManagerRemote Access Connection ManagerRemote Procedure Call (RPC)Remote Procedure Call (RPC) LocatorRemote RegistryServerWindows Management InstrumentationWindows Management Instrumentation Driver ExtensionsWMI Performance Adapter EnableDCOM registry entry that controls the global activation and call policies is disable either on the MID Server or on the target Windows Server Perform the following steps both on the MID Server and on the Windows Server to verify that DCOM is enabled on both servers: Navigate to the registry.Check the following registry entry on both computers: Key: HKEY LOCAL MACHINE\Software\Microsoft\OleName: EnableDCOMType: REG_SZData: Y Execution policy on target server does not allow scripts to be run Ensure the execution policy is set accordingly. See following documentation for requirements: PowerShell for Discovery and Service Mapping Following Microsoft documentation goes over how to check the execution policy and how to set it: Get-ExecutionPolicySet-ExecutionPolicy Target server does not allow remote execution Enable remote execution: Enable-PSRemoting