Windows 10 PowerShell to Query Compliance Status
Recently, I have worked on scripts to automate post deployment actions for Windows 10 clients deployed with Intune and AutoPilot.
There are a number of points where the deployment script needs to know whether the Windows 10 Client is compliant. I have yet to find any way of detecting the compliance status of the machine through PowerShell, WMI or COM.
I could connect to Azure and query the compliance status but that would involve caching a powerful admin account in a deployment script.
I would like a PowerShell command that I could run from a Windows 10 client using an ordinary user account. The PowerShell command would provide the compliance status of the Windows 10 client.