From e99736ba3cd1befce99c54fe38456989c53accc6 Mon Sep 17 00:00:00 2001 From: bbrendon Date: Sat, 29 May 2021 19:25:53 -0700 Subject: [PATCH] fixed an edge case and warning notes --- scripts/Win_Bitlocker_Create_Status_Report.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/Win_Bitlocker_Create_Status_Report.ps1 b/scripts/Win_Bitlocker_Create_Status_Report.ps1 index 2800925a..0facd763 100644 --- a/scripts/Win_Bitlocker_Create_Status_Report.ps1 +++ b/scripts/Win_Bitlocker_Create_Status_Report.ps1 @@ -1,4 +1,9 @@ ## Copied from https://github.com/ThatsNASt/tacticalrmm to add to new pull request for https://github.com/wh1te909/tacticalrmm +# +# WARNING +# 1. Only applies to drive C +# 2. Assumes you're encrypting more than the used space. "Used Space Only Encrypted" is the default windows behavior which is not compatible here. + function Log-Message { Param ( @@ -22,7 +27,7 @@ function Log-Message { $log = "BitlockerReport.txt" #Find BL info -$mbde = [string](manage-bde -status) +$mbde = [string](manage-bde -status C:) $mbdeProt = (manage-bde -protectors -get c: | Select-Object -Skip 6) #Dig out the recovery password, check for PIN ForEach ($line in $mbdeProt) { @@ -94,4 +99,4 @@ if ($Encrypted -eq "Yes" -and $RecoveryPassword -and $PIN -eq $true) { Log-Message "SUCCESS: Encrypted, PIN enabled, password is set." $log e Write-Host "Script check passed" exit 0 -} \ No newline at end of file +}