r/PowerShell • u/Skunklabz • Aug 05 '20
Microsoft Windows Terminal Setup using Chocolatey and Oh-My-Posh
https://www.youtube.com/watch?v=d2urMutBGJs&feature=share12
u/MrWinks Aug 06 '20
WIN-X, A
That keyboard sequence opens PoSh as admin. Watching you click start and type in PoSh hurt my eyes. 😂
Thanks for the lovely video.
6
u/Skunklabz Aug 06 '20
I didn't know that. I usually just pin to taskbar then right click. Thanks!!!
4
u/MrWinks Aug 06 '20
That was the top PoSh trick posted here and frankly has stuck to me more than nearly any other trick. I use it every single day several times a day.
1
u/Kalersays Aug 27 '20
I pin it to the taskbar as well, but I have the executable set up to always run as admin. That way it's even less clicks to open.
1
u/MrWinks Nov 20 '20
Win+X, A is admin. Sorry for the late reply.
2
u/Kalersays Nov 20 '20
That one opens the Windows integrated PowerShell. I use a custom shortcut that I pin to taskbar and start. Clicking that opens Windows Terminal in admin mode.
I've put this command line in the shortcut:
"C:\Program Files\PowerShell\7\pwsh.exe" -command Start-Process -FilePath "wt" -Verb RunAs4
u/smalls1652 Aug 06 '20
If I'm on a system that doesn't have Windows Terminal, like a server, our WVD session hosts, or someone else's computer, I do this.
Win+X, IandWin+X, Aare stuck in my muscle memory. The same goes for sign outWin+X, U, I, restartWin+X, U, R, and shutdownWin+X, U, R. It's easily the best thing that came from Windows 8.1.For my work laptop, I have Windows Terminal pinned to my taskbar (Slot 3) and I use
Shift+Ctrl+Win+3if I need an admin prompt. I also have PowerToys installed with PowerToys Run enabled, so I can doWin+Space, type in Terminal (or> wt.exe), and thenShift+Ctrl+Enterto get an admin prompt. If I brain fart I can also just use the built-in Windows Search by typing inwt.exeand pressingShift+Ctrl+Enter. I don't know why I know all of these different methods off the top of my head.1
u/save_earth Nov 20 '20
This opens CMD for me, is there a way to do this for Windows Terminal?
2
u/MrWinks Nov 20 '20
You have to set Powershell to be the default for it. Right-click taskbar and go into the taskbar options and in server 2012 and older windows, change the Win+X keyboard shortcut to use Powershell instead.
No, you can’t set it to terminal as it’s not native.
1
0
u/gangculture Aug 06 '20
jesus. where have you been all my life? now how can i do the same but for ISE?
3
u/MrWinks Aug 06 '20
You never ever ever use ISE again and you download Microsoft’s current ISE, VSCode, install the PowerShell extension on it, and set it to be the default for all ps1 files.
0
u/panzerbjrn Aug 06 '20
If VSCode wasn't such a bad text editor, and lacks some keyboard shortcuts, I'd probably use it, but for now, Notepad++ 4 EVAH!
3
u/Semicol0n Aug 06 '20
There’s an extension for VSCode that sets it up to use the same keyboard shortcuts as notepad++.
1
-3
8
u/liquidcloud9 Aug 06 '20
I’ve been running this for at least 6 months. This combo dramatically improves the terminal experience on Windows.