Read the current state, not the toggle
**SecurityServicesRunning** contains 2 when memory integrity is active. The Settings toggle can look on while the service is off after a failed driver load.
Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard | Select-Object VirtualizationBasedSecurityStatus,SecurityServicesConfigured,SecurityServicesRunning
msinfo32
# look for Virtualization-based security and HVCI entries