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