You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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