-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for more than one Bitlocker key per volume #8
Conversation
I was finding that the script would enumerate more than one $KeyProtectorId and then fail to write to Entra ID (BackupToAAD-...) as the value was an array and not a single GUID. This update loops for each $KeyProtectorId and writes each one to Entra ID. Failing script if any one of the attempts fails. Script succeeds if ALL keys are uploaded
foreach ($Key in $BitlockerKey) { | ||
|
||
try { | ||
BackupToAAD-BitLockerKeyProtector -MountPoint $BitlockerDrive -KeyProtectorId $Key #-ErrorAction SilentlyContinue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add -ErrorAction Stop
to make sure the catch kicks in.
@brianreidc7 Doesn't this PR then fix #7? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. I have no life at the moment because if high workload. So, I can't test.
Thanks man, thats good to know 🥰
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Baard Hermansen ***@***.***>
Sent: Tuesday, November 7, 2023 10:59:11 AM
To: mardahl/PSBucket ***@***.***>
Cc: Michael Mardahl ***@***.***>; Mention ***@***.***>
Subject: Re: [mardahl/PSBucket] Added support for more than one Bitlocker key per volume (PR #8)
Hi Michael @mardahl<https://github.com/mardahl>
Just a tip: If you add
Close #7<#7>
when approving a merge (PR), the corresponding issue will be closed and linked to this PR :)
—
Reply to this email directly, view it on GitHub<#8 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAHJPEIG4SOQCM3HFR63N23YDIA67AVCNFSM6AAAAAA67NZT6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJYGE3TSMBWHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I was finding that the script would enumerate more than one $KeyProtectorId and then fail to write to Entra ID (BackupToAAD-...) as the value was an array and not a single GUID.
This update loops for each $KeyProtectorId and writes each one to Entra ID. Failing script if any one of the attempts fails. Script succeeds if ALL keys are uploaded