add file
stolen from TRMM, then edited to exit 1 for triggering the activate task
This commit is contained in:
parent
d429c3464b
commit
1a385479b0
19
Bitlocker Get Keys C.ps1
Normal file
19
Bitlocker Get Keys C.ps1
Normal file
|
@ -0,0 +1,19 @@
|
|||
param(
|
||||
[switch]$KeyOnly = $false
|
||||
)
|
||||
|
||||
if ($KeyOnly) {
|
||||
(Get-BitLockerVolume -MountPoint C).KeyProtector.RecoveryPassword
|
||||
}
|
||||
else {
|
||||
$protectors = manage-bde -protectors C: -get
|
||||
if ($protectors -match 'ERROR' ) {
|
||||
$protectors
|
||||
exit 1
|
||||
}
|
||||
else {
|
||||
$protectors
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue