Jump to content


anyweb

Configuring BitLocker in Intune - Part 2. Automating Encryption

Recommended Posts

sure post your updated code here

Share this post


Link to post
Share on other sites


Thanks for this script/ solution. Thanks to this I learned a lot about how to do BitLocker with PowerShell from Intune MDM. I've added some functionality and made some fixes and design changes, but can't release all the code here due to the fact that I've done this for my company, and it's their IP.

That being said, I'd like to share a fix to one part that failed for me some times: Fetching the certificate for uploading recovery password to Azure AD using REST.
I rewrote it to this, might be usefull for others:

# Get the AAD Machine Certificate
$Certificate           = $([array]$(Get-ChildItem -Path 'Certificate::LocalMachine\My').Where{$_.'Issuer' -match 'CN=MS-Organization-Access'})
$CertificateThumbprint = [string]$($Certificate | Select-Object -ExpandProperty 'Thumbprint')
$CertificateSubject    = [string]$([string]$($Certificate | Select-Object -ExpandProperty 'Subject').Replace('CN=',''))
                    
# Get tenant domain name from registry
$TenantDomain = [string]$([string]$(Get-ItemProperty -Path ('Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CloudDomainJoin\JoinInfo\{0}' -f ($CertificateThumbprint)) -Name 'UserEmail' | Select-Object -ExpandProperty 'UserEmail').Split('@')[-1])

 

Offtopic: How do I set a profile picture? I've searched the forum and Google-ed it too.

Edited by olavrb
  • Like 1

Share this post


Link to post
Share on other sites

thanks @olavrb

this is a good contribution, please keep them coming, as regards your profile pic, you need at least 10 posts to be able to change it,

 

cheers !

niall

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...