Windows 7 WMI query generic failure when accessing MDM_VPNv2_01 class

  • Thread starter Thread starter Arun Koshal
  • Start date Start date
A

Arun Koshal

Guest
I am trying to setup auto VPN on Windows 10 laptop and created a Powershell scripted as suggested in Configure Windows 10 Client Always On VPN Connections. I am using the same script to setup the VPN.

The profile creation works fine, but when I run the script again, deletion of the profile fails. I debugged the problem and found out that EnumerateInstances on MDM_VPNv2_01 class in root\cimv2\mdm\dmmap namespace is failing. It fails with following error string - "A general error occurred that is not covered by a more specific error code..".

On doing some more exploration, I found out that I need to execute following WMI query to get the instances of MDM_VPNv2_01 class, that too returns a Generic Failure (Please note I have a VPN adapter created on the laptop when I executed this query):

PS C:\> Get-WmiObject -Namespace root\cimv2\mdm\dmmap -Class MDM_VPNv2_01
Get-WmiObject : Generic failure
At line:1 char:1
+ Get-WmiObject -Namespace root\cimv2\mdm\dmmap -Class MDM_VPNv2_01
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

I tried several options like running this query in WMI-explorer, recompiling the MOF for this particular provider etc., but nothing helped. I ran WMIDiag on my machine which gives following message for the MDM_VPNv2_01 class:

.9847 17:26:21 (3) 1 static instance(s) found for '__SystemSecurity' in 'ROOT/CIMV2/MDM/DMMAP'in 0 second(s).
.9848 17:26:21 (3) Retrieving static information (MOF) of 'MDM_VPNv2_01' (I=1).
.9849 17:26:21 (3) Qualifier information of 'MDM_VPNv2_01': Dynamic=True, Provider='DMWmiBridgeProv', Association=False.
.9850 17:26:21 (3) Dynamic 'MDM_VPNv2_01' class in 'ROOT/CIMV2/MDM/DMMAP' is supported by WMI provider 'DMWmiBridgeProv'.
.9851 17:26:21 (3) Skipping request of dynamic instances of 'MDM_VPNv2_01' in 'ROOT/CIMV2/MDM/DMMAP' because:
.9852 17:26:21 (3) - Request all dynamic instances is set to FALSE.

Please note that the same script works fine on other laptops. It is worth mentioning here that I am running this script with a local user account having administrator privileges.

I enabled WMI activity debug and observed following error log on running the query to get MDM_VPNv2_01 class instances:

Log Name: Microsoft-Windows-WMI-Activity/Debug
Source: Microsoft-Windows-WMI-Activity
Date: 20-09-2018 19:38:41
Event ID: 101
Task Category: None
Level: Error
Keywords:
User: INCT-ARUN\akoshal
Computer: INCT-Arun
Description:
ComponentName = WMI_ADAPTER; ErrorId = 0x1; ErrorDetail = WMIContext::PostResultToServer, provider completed the operation with context (00000211E4C517A0). Failed with MIRESULT (1).; FileName = onecore\admin\wmi\wmiv2\tools\adapter\wmicontext.cpp:945

I could not find any helpful information related to this problem on Internet. It would be really a great help if someone can suggest a possible solution for this problem.

More...
 
Back
Top