Bitlocker recovery key delegation via Powershell
Hello admins!
In the A better way to delegate control for Bitlocker recovery keys post by @DerWoWusste we've been introduced by the approach that allows to avoid delegating full control to IT Techs who are supposed to be able to find bitocker recovery keys.
I have a question regarding implementation of the same thing but in Powershell.
I work in the education organization that supports 140 schools. One of the MSPs that we're working with services 83 of them.
I need to delegate their (MSP) IT Tech AD group a bitlocker keys read permissions in their corresponding OUs (domain/Resources/<SchoolCode>/Windows Computers)
The closest I found was in TechNet's post that the OP was complaining about as not working.
I have some PS experience in ExchangeOnline (link leads to SpiceWorks O365 related question of mine that I answer myself), but I'm not sure what to start with in this case.
Please nudge me in the right direction.
In the A better way to delegate control for Bitlocker recovery keys post by @DerWoWusste we've been introduced by the approach that allows to avoid delegating full control to IT Techs who are supposed to be able to find bitocker recovery keys.
I have a question regarding implementation of the same thing but in Powershell.
I work in the education organization that supports 140 schools. One of the MSPs that we're working with services 83 of them.
I need to delegate their (MSP) IT Tech AD group a bitlocker keys read permissions in their corresponding OUs (domain/Resources/<SchoolCode>/Windows Computers)
The closest I found was in TechNet's post that the OP was complaining about as not working.
dsacls.exe "OU=Computers,$OrganizationalUnitDN" /G $prefixlocation-$type":RP;msFVE-RecoveryPassword;msFVE-RecoveryInformation" /I:S
I have some PS experience in ExchangeOnline (link leads to SpiceWorks O365 related question of mine that I answer myself), but I'm not sure what to start with in this case.
Please nudge me in the right direction.
Bitte markiere auch die Kommentare, die zur Lösung des Beitrags beigetragen haben
Content-ID: 1638502270
Url: https://administrator.de/contentid/1638502270
Ausgedruckt am: 26.11.2024 um 04:11 Uhr
5 Kommentare
Neuester Kommentar
Hi @nekku6, welcome to administrator.pro!
If you want create the delegation with pure powershell you can do it like this. This will grant read access, sets the confidentially bit on subordinate msFVE-RecoveryInformation objects for a defined OU and user/group.
As @DerWoWusste already mentioned, restricting the extended right for only the attribute msFVE-RecoveryPassword is not possible, it must be delegated to the whole msFVE-RecoveryInformation object .
Regards @colinardo
If you want create the delegation with pure powershell you can do it like this. This will grant read access, sets the confidentially bit on subordinate msFVE-RecoveryInformation objects for a defined OU and user/group.
<#
Delegate read access to Bitlocker-RecoveryInformation objects in AD Organizational Units
#>
Import-Module ActiveDirectory
# OU
$OU = 'OU=MyAdmins,DC=testlab,dc=intern'
# Group/Account
$account = ([System.Security.Principal.NTAccount]"MyAdminGroup")
# get acl of the OU
$acl = Get-ACL "AD:$OU"
# create the access rule
$rule = New-Object System.DirectoryServices.ActiveDirectoryAccessRule ($account,'ReadProperty,ExtendedRight','Allow','{00000000-0000-0000-0000-000000000000}','All',"{ea715d30-8f53-40d0-bd1e-6109186d782c}")
# add the rule to acl
$acl.AddAccessRule($rule)
# save acl back to the OU
Set-ACL "AD:$OU" $acl
As @DerWoWusste already mentioned, restricting the extended right for only the attribute msFVE-RecoveryPassword is not possible, it must be delegated to the whole msFVE-RecoveryInformation object .
Regards @colinardo