I’m trying get pwoershell to report if computers are using TPM only, to return as compliant but if using any other method, return as non-compliant. I’m always getting non-compliant, not sure where I’m going wrong…You’ll see in my Bitlocker its Tpm, which should report as compliant. Any help will be appricated.
Format cmdlets like Format-List or Format-Table are meant to be used for console output only. If you need to do further steps with your rich and powerful PowerShell objects you must not use format cmdlets as they are destroying the objects and turn them into stupid boring strings.
This way you have the computername related to the query status.
Regardless of all that - please do not post images of code or error messages. Instead post the plain text and format is code.
When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.