Better interaction with bitlocker #11201
darknight7
started this conversation in
Ideas
Replies: 1 comment
-
New version, will work with PS 5.1 that comes with Windows, gsudo still required:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been struggling with bitlocker because the UI won't allow autotype to work (window closes as soon as focus is lost).
Also, all command line programs require elevated privileges: this in turn would require to run KeepassXC as admin.
I don't like my password to stay in the clipboard, even temporarily.
After a considerable amount of research I've created a script that is a workaround for this second scenario, it requires gsudo to be installed (winget install gsudo).
Save the following as bitlockerunlock.ps1 for example and run it from GUI or from terminal.
When you run the script it will ask for drive letter and password, only after it will ask for admin privileges, thereby circumventing the "interact with elevated processes problem". Tested with powershell 7.4.4, uses a 7.4 feature
CommandWithArgs
. Notice the backticks escaping every $ in the final command line.I hope this will be useful for someone else.
Beta Was this translation helpful? Give feedback.
All reactions