title: Is there a SecurityCenter2 namespace equivalent on Windows Server 2019?
body: <p>I am writing a C# application that, among other things, gathers status information about Windows Defender. On Windows 10, using <code>ManagementObjectSearcher(@"Root\SecurityCenter2", "SELECT * FROM AntiVirusProduct")</code> works fine to get some initial information (e.g., Windows Defender is installed, is enabled, and is up-to-date), but on Windows Server 2019, I take an invalid namespace exception on <code>Root\SecurityCenter2</code>. </p>
  
  <p>Using PowerShell and </p>
  
  <pre><code>Get-WMIObject -namespace "root" -class "__Namespace" | Select Name
  </code></pre>
  
  <p>I've browsed through the WMI namespaces on Windows Server 2019, but don't see anything that jumps out at me as an equivalent/newer version of the <code>SecurityCenter2</code> namespace. If I just assume that Windows Defender is installed and enabled, I can successfully gather other required details in the <code>Root\Microsoft\Windows\Defender</code> namespace just fine. But I'd prefer to be able to check the general status of Windows Defender beforehand, using the <code>AntiVirusProduct</code> class.</p>
  
  <p>Is there an alternative namespace to <code>SecurityCenter2</code> that can be used for performing this initial WMI query on Windows Server 2019?</p>