I love using gsudo[0] for this. It doesn't support running as TrustedInstaller (AFAIK), but when I run into a command that requires elevated permissions, I just prepend `sudo` at the beginning, and it elevates the current shell (without a new window) and lets me run the command.
PS> choco upgrade deno
Chocolatey detected you are not running from an elevated command shell
^C
PS> sudo choco upgrade deno
Chocolatey v0.10.15
Upgrading the following packages:
deno
I love using gsudo[0] for this. It doesn't support running as TrustedInstaller (AFAIK), but when I run into a command that requires elevated permissions, I just prepend `sudo` at the beginning, and it elevates the current shell (without a new window) and lets me run the command.
[0]: https://github.com/gerardog/gsudo