Get current privacy settings for Windows 10 1803 using WMIC

0

There is supposedly a WMI provider for the privacy options

I tried

wmic -namespace:\\root\cimv2\mdm\dmmap path MDM_Policy_Config01_Privacy2

but that doesn't seem to be the right namespace


UPDATE:

wmic /namespace:\\root\cimv2\mdm\dmmap path MDM_Policy_Result01_Privacy02

does return an object with the right property names, but it does not appear to be directly connected to the current policy, One can change privacy settings in the control panel, but the WIMC command returns the same result.

Trying it with powershell by using

Get-CimInstance -Namespace root\cimv2\mdm\dmmap -ClassName MDM_Policy_Result01_Privacy02

gives the same sort of non-change behavior

If there is some sort of method out there that will update that object, I have not found it

infixed

Posted 2018-06-12T18:12:19.990

Reputation: 759

Well, that class does exist in my WMI but there are no instances of the class. What settings exactly are you trying to retrieve? There is a class named MDM_Policy_Result01_Privacy2 that does have one instance on my machine. – EBGreen – 2018-06-12T18:17:08.533

@EBGreen I am trying to programmatically audit which privacy settings are on or off. gpresult does not seem to show them, nor do they seem to appear change in the registry as the settings change – infixed – 2018-06-12T18:48:44.263

@EBGreen, could you share a WMIC invocation that would dump the MDM_Policy_Result01_Privacy02 instance you refer to? – infixed – 2018-06-12T18:56:05.663

Nope. Powershell will do it though: Get-WMIObject -Namespace 'root\cimv2\mdm\dmmap' -ClassName MDM_Policy_Result01_Privacy02 – EBGreen – 2018-06-12T19:02:10.790

@EBGreen, while I get an object with correctly named properties in that, said properties do not seem to fluctuate. Get them in PS, then switch to the control panel and alter a setting, then go back to PS and get them again and the properties are identical. Seems like something else needs to be done to get the current setting – infixed – 2018-06-13T14:30:19.873

No answers