fixed an edge case and warning notes
This commit is contained in:
parent
53367c6f04
commit
e99736ba3c
|
@ -1,4 +1,9 @@
|
||||||
## Copied from https://github.com/ThatsNASt/tacticalrmm to add to new pull request for https://github.com/wh1te909/tacticalrmm
|
## 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 {
|
function Log-Message {
|
||||||
Param
|
Param
|
||||||
(
|
(
|
||||||
|
@ -22,7 +27,7 @@ function Log-Message {
|
||||||
$log = "BitlockerReport.txt"
|
$log = "BitlockerReport.txt"
|
||||||
|
|
||||||
#Find BL info
|
#Find BL info
|
||||||
$mbde = [string](manage-bde -status)
|
$mbde = [string](manage-bde -status C:)
|
||||||
$mbdeProt = (manage-bde -protectors -get c: | Select-Object -Skip 6)
|
$mbdeProt = (manage-bde -protectors -get c: | Select-Object -Skip 6)
|
||||||
#Dig out the recovery password, check for PIN
|
#Dig out the recovery password, check for PIN
|
||||||
ForEach ($line in $mbdeProt) {
|
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
|
Log-Message "SUCCESS: Encrypted, PIN enabled, password is set." $log e
|
||||||
Write-Host "Script check passed"
|
Write-Host "Script check passed"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue