使用 Powershell 脚本查找 TpmPin

时间:2021-07-19 10:02:27

标签: powershell script bitlocker

我需要一个 PS 脚本,它会根据 TpmPin 是否存在于“KeyProtector”中而产生 True 或 False(见附图)

我试过了:

$res3 = Get-BitLockerVolume -MountPoint C
if ($res3 -like 'Tpm'){write 'True'} else {write 'false'}

但即使值在那里,也总是得到“假”。 see screen shot

我尝试了在本网站其他地方找到的一些示例片段,它们有效:

$coll = 'one','two','three','four'
if ($coll -contains 'two'){write 'True'} else {write 'false'}

这会根据需要返回 T/F。

我做错了什么? 谢谢

0 个答案:

没有答案
相关问题