Example 1:
for /F "tokens=3 delims= " %%A in ('manage-bde -status %systemdrive% ^| findstr " Encryption Method:"') do (
if "%%A"=="AES" goto EncryptionCompleted
)
:EncryptionCompleted
Example 2:
for /F %%A in ('wmic /namespace:\\root\cimv2\security\microsofttpm path win32_tpm get IsEnabled_InitialValue ^| findstr "TRUE"') do (
if "%%A"=="TRUE" goto nextcheck
)
:nextcheck
Please help to find the below code as run on .bat
to stop script execution.
The command is:
powershell.exe (Get-Tpm | Select -Property TpmReady).TpmReady -eq $False
then goto Failed
:Failed