BackupToAAD-BitLockerKeyProtector Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Bojan Dunkic 1 Reputation point
2022-05-06T14:25:11.223+00:00

Hello everyone,

I have a problem when running this bit of Powershell code only on select devices on our company network:

BackupToAAD-BitLockerKeyProtector -MountPoint $env:SystemDrive -KeyProtectorId ((Get-BitLockerVolume -MountPoint $env:SystemDrive ).KeyProtector | where {$_.KeyProtectorType -eq "RecoveryPassword" }).KeyProtectorId

Namely, it throws an error exception like this:

BackupToAAD-BitLockerKeyProtector : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
At line:1 char:1
+ BackupToAAD-BitLockerKeyProtector $env:systemdrive -KeyProtectorId $R ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,BackupToAAD-BitLockerKeyProtector

This is very strange as I'm running the powershell script as an Admin on the devices. Some manage to run the script successfully and some get the above error.

BitLocker is enabled on all devices on the network and the devices are Azure AD Hybrid Joined.

Anyone able to help?

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Real MVP 1 Reputation point
    2022-08-12T17:59:06.347+00:00

    In my experience, command is working locally but the communication to AzureAD is not. Check for proxies or other network interference that might alter traffic/packets.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.