windows-elevation-from-wsl
Handle "Access is denied" from powershell.exe or pwsh.exe run inside WSL: scheduled-task registration, service changes, LSA rights grants such as SeBatchLogonRight, HKLM writes or any other Windows state change from WSL. Use it before attempting such a write from WSL and the moment one is denied.
- License
- MIT
- Compatibility
- A WSL session on a Windows host that drives Windows through powershell.exe / pwsh.exe via interop. Not applicable on Claude.ai web, hosted sandboxes, macOS or plain Linux, and not needed in a session whose WSL was itself launched from an elevated Windows prompt.
Pinned to revision 1434f6275008, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.