Sudo for Windows is now available in Windows 11 Insider Preview Build 26052, allowing users to run elevated commands without needing to open a new elevated console. This new feature, which can be enabled in Windows Settings or through an elevated console session, provides three configuration options: opening a new window, keeping input closed, or using an inline configuration similar to sudo on other operating systems. Microsoft is also open-sourcing this project and plans to provide more information and documentation in the future. Users can provide feedback through the GitHub repository.
https://devblogs.microsoft.com/commandline/introducing-sudo-for-windows/