I am developing an MFC C++ application and I need to detect which server roles have been installed for Windows Server 2012 and later.
In Windows Server 2008 the Win32_ServerFeature class could be used. Win32_ServerFeature
For Server 2012 there is the ServerManager DeploymentProvider which has little documentation and I am not sure if it can be used with C++. ServerManager Deployment Provider
Is there any way in C++ to detect Server Roles on Windows Server 2012 and later without using Powershell Cmdlets?