I have an issue with all computers in AD:
I'm getting this error after creating VBScriptEngine with debugging flag: either a required impersonation level was not provided, or the provided impersonation level is invalid.
(Exception from HRESULT: 0x80070542)
The problem is around this line:
processDebugManager.AddApplication(debugApplication, out debugApplicationCookie))
where processDebugManager is COM:
{78A51822-51F4-11D0-8F20-00805F2CD064} [IProcessDebugManager]
Impersonation is enabled in the local politics.
Any ideas which restriction could it be?
Forgot to add a solution. This error means that we have installed the mdm (Machine Debug Manager) from VS2002 (which is not used anymore). To fix it we should perform the following steps:
Click right mouse click on " Machine Debug Manager" and open "Properties" Stop the service (click the stop button) and disable it (change the status Type)
Reregister system DCOM MDM Open cmd as an Administrator:
WIN 64 (x64): type the following (we have to change the directory to SysWOW64):
Restart the computer.
If you get access issues, please check DCOM permissions
Open the "Security" tab and recheck permissions. Try to add everyone (or someone special) to understand that it's a permission issue.
The issue I have described here (with images): https://www.zaptest.com/forum/zaptest-best-practices/4057-impersonation-level-is-invalid-0x80070542