WMI "root\SecurityCenter2" C++ documentation

A A 26 Reputation points
2020-12-07T11:05:43.577+00:00

Hello, I have searched documentation / examples on how to use objects from WMI "root\SecurityCenter2" but could not find anything. I want to know if there is any resources on how to use and what are the objects from this namespace? Thank you.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,546 questions
0 comments No comments
{count} vote

Accepted answer
  1. Viorel 112.7K Reputation points
    2020-12-07T11:40:24.473+00:00

    You can investigate it using “wbemtest” tool. Start it from Run dialog or console. (It is usually included in Windows).

    Press “Connect”, enter “root\SecurityCenter2”.

    Press “Enum Classes…” and “OK” to list the available classes.

    Press “Enum Instances…” and enter “AntiVirusProduct”, for example (i.e. a class). If instances are found, open (double-click) them to see details.

    To access WMI in C++: https://learn.microsoft.com/en-us/windows/win32/wmisdk/creating-a-wmi-application-using-c-.

    2 people found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. RLWA32 40,856 Reputation points
    2020-12-07T11:28:33.813+00:00

    As far as I know root\SecurityCenter2 is not documented by Microsoft.

    However, you may find the WscGetSecurityProviderHealth function to be helpful.

    And there is this from SO - detecting-anti-virus-on-windows-with-wmi-which-namespace

    1 person found this answer helpful.

  2. Castorix31 81,831 Reputation points
    2020-12-07T11:52:01.457+00:00

    You can use in a PowerShell command :

    Get-CimClass -Namespace root\SecurityCenter2
    
    0 comments No comments

  3. A A 26 Reputation points
    2020-12-07T12:24:56.54+00:00

    For someone interested in getting information on antivirus, firewall, etc, there is also exists this solution:
    https://github.com/microsoft/Windows-classic-samples/tree/master/Samples/WebSecurityCenter
    But it's marked to work with Windows 8 and above.