Jump to content

Recommended Posts

  • ExTS Admin
Posted

I am trying to setup auto VPN on Windows 10 laptop and created a Powershell scripted as suggested in https://docs.microsoft.com/en-us/windows-server/remote/remote-access/vpn/always-on-vpn/deploy/vpn-deploy-client-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...

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...