We need to test if customer PCs/Laptops meet certain criteria, and one of them is they must have a device that's domain joined - no home users, no serverless non-domain scenarios.
With Azure, the way to check is to query "dsregcmd /status | find /I "AzureAdJoin", then look for the result, which can be piped out to a file.
Won't do it - does not produce any result unless it's in a batch file that runs by clicking the.bat file. Calling the batch file, no dice.
For non Azure/trad server machine, piece of cake. The App checks domain joined or not and errors out if not. But someone could have a corp laptop that is Azure but not "domain joined", no AD, so effectively a BYOD device or other not-really-domain machine.
Is there a way...or am I missing something. We don't want some intern on a BYOD machine being able to use software that's meant for Admins with full domain access.