@echo off
title MDM Policy Check
powershell.exe -ExecutionPolicy Bypass -Command ^
 "$path = 'HKLM:\SOFTWARE\Microsoft\PolicyManager\current\device\ADMX_Power';" ^
 "Write-Host '';" ^
 "if (Test-Path $path) {" ^
 "  Write-Host '  READY FOR LOCKDOWN  ' -ForegroundColor White -BackgroundColor DarkGreen;" ^
 "} else {" ^
 "  Write-Host '  NOT READY FOR LOCKDOWN  ' -ForegroundColor White -BackgroundColor Red;" ^
 "};" ^
 "Write-Host '';" ^
 "Write-Host 'Press any key to exit...';" ^
 "$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')"
