Hi,
I am trying to run the following script with no success.
It will be tested on windows machines but something is getting messy with the curly brackets.
action uses wow64 redirection false
wait "c:\Windows\system32\windowspowershell\v1.0\powershell.exe" -command
try{
$BLV = Get-BitLockerVolume -MountPoint $env:SystemDrive
$KeyProtectorID=""
foreach($keyProtector in $BLV.KeyProtector){
if($keyProtector.KeyProtectorType -eq "RecoveryPassword"){
$KeyProtectorID=$keyProtector.KeyProtectorId
break;
}
}
$result = BackupToAAD-BitLockerKeyProtector -MountPoint "$($env:SystemDrive)" -KeyProtectorId $KeyProtectorID
return $true
}
catch{
return $false
}
Your help will be appriciated.