Update enable-bitlocker.ps1
This commit is contained in:
1 parent
21d7494e2a
commit
67ae566087
1 file changed
+4
-1
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user