From 67ae5660871a510fffc9a2ab436bb90ed9ef140f Mon Sep 17 00:00:00 2001 From: rogier Date: Tue, 21 Jan 2025 00:23:00 +0100 Subject: [PATCH] Update enable-bitlocker.ps1 --- enable-bitlocker.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/enable-bitlocker.ps1 b/enable-bitlocker.ps1 index 1e3c2ac..d4714cb 100644 --- a/enable-bitlocker.ps1 +++ b/enable-bitlocker.ps1 @@ -11,6 +11,9 @@ if ($bitlockerStatus.ProtectionStatus -eq "On") { exit 0 } +# Add Windows Forms assembly +Add-Type -AssemblyName System.Windows.Forms + # Prompt user to select save location for recovery key $saveDialog = New-Object System.Windows.Forms.SaveFileDialog $saveDialog.Filter = "Text Files (*.txt)|*.txt" @@ -55,4 +58,4 @@ Please keep this file in a safe place. You will need this key to recover your da } else { Write-Warning "Operation cancelled by user" exit 0 -} +} \ No newline at end of file