the Get-NetFirewallProfile cmdlet has the option -PolicyStore ActiveStore which is the sum of all policies on that computer. When I run it I get the firewall profile state with GPO taken under consideration.
Alternatively I can get the CIM instance with Get-CimInstance -Namespace Root\StandardCimv2 -ClassName MSFT_NetFirewallProfile or Get-WmiObject -Namespace "Root\StandardCimv2" -Query "SELECT * FROM MSFT_NetFirewallProfile", BUT the GPO value are discarded.
How can I set the policy store in the Get-WmiObject -Namespace "Root\StandardCimv2" -Query "SELECT * FROM MSFT_NetFirewallProfile"?
In the end I'm going to implement the query in c++ with the wbemcli api