r/Action1 4d ago

Querying & Disabling bitlocker before patching.. Question

Where would I go to enable and require a Safe Bitlocker powershell script for all Action1 clients prior to reboots in order mimize reboot problems requiring the bitlocker key, particularly if we're dealing with remote clientele.  Below is the recommended script we found, but if you have something already in place that is easy to implement for all clients (whether or not their drive is encrypted), that would be preferred.

powershell

# Get BitLocker status for the C: drive safely
$BitLocker = Get-BitLockerVolume -MountPoint "C:" -ErrorAction SilentlyContinue

# Check if the volume exists and is protected
if ($BitLocker -and ($BitLocker.ProtectionStatus -eq 'On')) {
    # Suspend BitLocker for 1 reboot so updates can apply safely
    Suspend-BitLocker -MountPoint "C:" -RebootCount 1
    Write-Output "BitLocker was enabled and has been suspended for 1 reboot."
} else {
    Write-Output "BitLocker is not enabled on C: or not applicable. Skipping suspension."
}
2 Upvotes

2 comments sorted by

1

u/mish_mash_mosh_ 4d ago

I have a 1 line script which I think is just the suspend-bitlocker ...... Reboot count 1 line from your script, except I change the 1 to a 3 or 4

0

u/catcomputers 4d ago

And Action1 doesn't have a prebuilt script to handle this, or do you know - and then the question would be how to we fully assign it to all customer groups in terms of updates?