r/PowerShell • • Aug 05 '20

Microsoft Windows Terminal Setup using Chocolatey and Oh-My-Posh

https://www.youtube.com/watch?v=d2urMutBGJs&feature=share
146 Upvotes

19 comments sorted by

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.

0

u/[deleted] Aug 06 '20

[deleted]

2

u/Skunklabz Aug 06 '20

I work in a Windows environment where we also manage Linux servers. If you watch my other videos, I normally use pwsh on macOS. But yeah even on my work Windows machine I also use WSL anda pwsh.

2

u/liquidcloud9 Aug 06 '20

Most of my work is tied to using Windows-only modules. I use WSL, too, but mostly for funsies and sometimes some data crunching.

12

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 RunAs

4

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, I and Win+X, A are stuck in my muscle memory. The same goes for sign out Win+X, U, I, restart Win+X, U, R, and shutdown Win+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+3 if I need an admin prompt. I also have PowerToys installed with PowerToys Run enabled, so I can do Win+Space, type in Terminal (or > wt.exe), and then Shift+Ctrl+Enter to get an admin prompt. If I brain fart I can also just use the built-in Windows Search by typing in wt.exe and pressing Shift+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.

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

u/panzerbjrn Aug 06 '20

Thanks, I'll try installing that and see how I get on.

-3

u/gangculture Aug 06 '20

lols no i’m ok thanks