gsudo is a Windows command-line utility that provides Unix-style sudo functionality for executing commands with elevated privileges. It allows users to run administrative operations within their existing terminal session or open a separate elevated console. Supported environments include Command Prompt, PowerShell, PowerShell Core, Git Bash, and Cygwin. Optional credential caching reduces repeated User Account Control prompts during authorized administrative sessions. Configurable security settings support alternative user accounts and Windows integrity levels. PowerShell integration enables elevated script execution with serialized object input and output. The utility preserves standard input, output, and error redirection for compatible commands. Additional functionality includes customizable elevated prompts, diagnostic logging, and session status inspection.
Features
- Windows command-line privilege elevation within existing terminal sessions or separate administrative console windows
- Multiple shell compatibility including Command Prompt, PowerShell, PowerShell Core, Git Bash, and Cygwin
- Configurable credential caching for reducing repeated User Account Control prompts during authorized administrative sessions
- Flexible execution under alternative user accounts with configurable Windows security integrity levels
- PowerShell script block elevation with serialized object handling and standard input or output redirection
- Customizable elevated command prompts with session status inspection and configurable diagnostic logging