(
if number of elements of it = 0 then "FAIL - TPM not visible in wmi" else
(
if
(
number of elements of it = 0
)
then "PASS" else "FAIL - TPM issues: " & concatenation "|" of elements of it
)
of set of elements whose
(
(
it contains "_InitialValue" AND not
(
it as boolean
)
of following text of first "=" of it
)
OR
(
(
it as version < "2.0"
)
of tuple string item 0 of following text of first "SpecVersion=" of it
)
)
of it
)
of set of
(
(
it as string
)
of selects "IsActivated_InitialValue, IsEnabled_InitialValue, IsOwned_InitialValue, SpecVersion from Win32_Tpm" of wmis "root\CIMv2\Security\MicrosoftTpm"
)
(if number of elements of it = 0 then "FAIL - TPM not visible in wmi" else (if (number of elements of it = 0) then "PASS" else "FAIL - TPM issues: " & concatenation "|" of elements of it) of set of elements whose ((it contains "_InitialValue" AND not (it as boolean) of following text of first "=" of it) OR ((it as version < "2.0") of tuple string item 0 of following text of first "SpecVersion=" of it)) of it) of set of ((it as string) of selects "IsActivated_InitialValue, IsEnabled_InitialValue, IsOwned_InitialValue, SpecVersion from Win32_Tpm" of wmis "root\CIMv2\Security\MicrosoftTpm")