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 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,276 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,389 questions
{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