Category: Windows Terminal

Windows Terminal Color Schemes -Themes

My Windows Terminal Color Schemes

The Windows Terminal became generally available at the Microsoft Build 2020 virtual conference a couple of weeks ago. I already blogged about how you can customize your Windows Terminal settings and shared my settings.json file. Many people asked me about the different Windows Terminal Color Schemes I use. So I thought a blog post would be a good way of sharing my Windows Terminal Schemes.

Windows Terminal 1.0 was released on May 19, you can find more documentation here on Microsoft Docs.

I already shared a couple of blog posts on how you can customize your Windows Terminal experience:

My Windows Terminal Color Schemes

Here is my Windows Terminal Color Schemes. Since I use the acrylic effect, I post a picture when the Windows Terminal window is active and one where it is inactive.

Vibrant Tom

Vibrant Tom

Vibrant Tom

Vibrant Tom Inactive

Vibrant Tom Inactive

This one I use for my default shell (PowerShell 7).

{
            // Color Scheme: VibrantTom
            "background" : "#16171D",
            "black" : "#878787",
            "blue" : "#44B4CC",
            "brightBlack" : "#E373C8",
            "brightBlue" : "#0000FF",
            "brightCyan" : "#19D1D8",
            "brightGreen" : "#81EC0D",
            "brightPurple" : "#FF00FF",
            "brightRed" : "#FF0000",
            "brightWhite" : "#E5E5E5",
            "brightYellow" : "#FFD93D",
            "cyan" : "#19D1D8",
            "foreground" : "#FFFFFF",
            "green" : "#CCFF04",
            "name" : "VibrantTom",
            "purple" : "#9933CC",
            "red" : "#FF6600",
            "white" : "#F5F5F5",
            "yellow" : "#FFD93D"
        },

Windows PowerShell Tom

Windows PowerShell Tom

Windows PowerShell Tom

Windows PowerShell Tom Inactive

Windows PowerShell Tom Inactive

{
            // Color Scheme: PowerShellTom
            "background" : "#012456",
            "black" : "#000000",
            "blue" : "#0000ff",
            "brightBlack" : "#AAAAAA",
            "brightBlue" : "#44B4CC",
            "brightCyan" : "#19D1D8",
            "brightGreen" : "#81EC0D",
            "brightPurple" : "#FF00FF",
            "brightRed" : "#FF0000",
            "brightWhite" : "#E5E5E5",
            "brightYellow" : "#FFD93D",
            "cyan" : "#19D1D8",
            "foreground" : "#FFFFFF",
            "green" : "#00ff00",
            "name" : "PowerShellTom",
            "purple" : "#9933CC",
            "red" : "#FF6600",
            "white" : "#F5F5F5",
            "yellow" : "#FFD93D"
        },

Retro Command Prompt

Retro Command Prompt

Retro Command Prompt

Dracula

Dracula

Dracula

Dracula Inactive

Dracula Inactive

{
            // Color Scheme: Dracula
            "background" : "#282A36",
            "black" : "#21222C",
            "blue" : "#BD93F9",
            "brightBlack" : "#6272A4",
            "brightBlue" : "#D6ACFF",
            "brightCyan" : "#A4FFFF",
            "brightGreen" : "#69FF94",
            "brightPurple" : "#FF92DF",
            "brightRed" : "#FF6E6E",
            "brightWhite" : "#FFFFFF",
            "brightYellow" : "#FFFFA5",
            "cyan" : "#8BE9FD",
            "foreground" : "#F8F8F2",
            "green" : "#50FA7B",
            "name" : "Dracula",
            "purple" : "#FF79C6",
            "red" : "#FF5555",
            "white" : "#F8F8F2",
            "yellow" : "#F1FA8C"
        },

Ubuntu Legit

UbuntuLegit

UbuntuLegit

UbuntuLegit Inactive

UbuntuLegit Inactive

This one I saw first at Scott Hanselman’s blog. This one I use for my Windows Subsystem for Linux 2 (WSL 2) running Ubuntu.

{
            // Color Scheme: UbuntuLegit
            "background":  "#2C001E",
            "black":  "#4E9A06",
            "blue":  "#3465A4",
            "brightBlack":  "#555753",
            "brightBlue":  "#729FCF",
            "brightCyan":  "#34E2E2",
            "brightGreen":  "#8AE234",
            "brightPurple":  "#AD7FA8",
            "brightRed":  "#EF2929",
            "brightWhite":  "#EEEEEE",
            "brightYellow":  "#FCE94F",
            "cyan":  "#06989A",
            "foreground":  "#EEEEEE",
            "green":  "#300A24",
            "name":  "UbuntuLegit",
            "purple":  "#75507B",
            "red":  "#CC0000",
            "white":  "#D3D7CF",
            "yellow":  "#C4A000"
        },

Vibrant Tom Light

Vibrant Tom Light

Vibrant Tom Light

Vibrant Tom Light Inactive

Vibrant Tom Light Inactive

This one I am still working on. I am not 100 percent happy, so let me know if you have any ideas.

{
            // Color Scheme: VibrantInkTom Light
            "background" : "#EEEEEE",
            "black" : "#878787",
            "blue" : "#44B4CC",
            "brightBlack" : "#595e68",
            "brightBlue" : "#0000FF",
            "brightCyan" : "#19D1D8",
            "brightGreen" : "#3f953a",
            "brightPurple" : "#FF00FF",
            "brightRed" : "#FF0000",
            "brightWhite" : "#E5E5E5",
            "brightYellow" : "#FF6600",
            "cyan" : "#44B4CC",
            "foreground" : "#16171D",
            "green" : "#3f953a",
            "name" : "VibrantTomLight",
            "purple" : "#9933CC",
            "red" : "#FF6600",
            "white" : "#F5F5F5",
            "yellow" : "#FFD93D"
        },

Conclusion

I hope this blog post helps you to customize your Windows Terminal and I hope you like my Windows Terminal color schemes. Let me know in the comments which Windows Terminal Theme you like best.



How to Change the Windows Terminal Default Shell Profile

How to Change the Windows Terminal Default Shell Profile

The Windows Terminal is now generally available as version 1.0. I already shared a blog post on how to customize the Windows Terminal and shared my personal settings.json file with a lot of different examples, like the integration of PowerShell Remoting, SSH Remoting, changing the background image and much more. One question I got is, how to change the Windows Terminal default shell or default profile from PowerShell to the Windows Subsystem for Linux (WSL) or the command line (cmd).

By default, the Windows Terminal takes PowerShell 7 (if it is installed) as the primary shell when you open the Windows Terminal. However, if you want to change that you can simply configure the default shell in Windows Terminal, in the settings.json file. On the top, you can find the “defaultProfile” setting with a GUID

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
....
}

The GUID is the GUID of your profile. For example, if you want to change it to cmd, you can use the following GUID “0caa0dad-35be-5f56-a8ff-afceeeaa6101”.

Windows Terminal Default Profile - Default Shell

Windows Terminal settings.json

I hope this blog post gives you a look on how to switch the default shell in Windows Terminal. I recommend that you check out my other blog post where I share even more details on how to customize the Windows Terminal. You can also read the full announcement blog for the version 1.0 here or check out the documentation on Microsoft Docs.

If you have any questions, feel free to leave a comment.



Install WinGet - Windows Package Manager

How to Install WinGet Windows Package Manager

For a long time, people have been asking for a package manager on Windows. Today at Microsoft Build, Microsoft announced the preview of the Windows Package Manager called WinGet. A package manager can help you to save time and quickly install software and tools on to your machine. Developers and IT Pros have wanted a native package manager in Windows for a long time and with WinGet, you will get that.

You can read more about the Windows Package Manager Preview announcement here.

How to install WinGet Windows Package Manager

The Windows Package Manager is currently in preview. To install the preview of Windows Package Manager, you basically have two options. Since WinGet is open source, you can clone, build, run, and test the code from the GitHub repository (https://github.com/microsoft/winget-cli). You can also become a Windows Insider an join the Windows Package Manager Insider program by sending your Microsoft Account (MSA) to [email protected] and request to be included in the preview.

App Installer in the Windows Store

App Installer in the Windows Store

After you have joined either Insider program, head over to the Microsoft Store and get the App Installer. The Windows Package manager will be available after you get the update.

How to install software using the Windows Package Manager

Now you can start using winget in the Windows Terminal, Windows command line, or PowerShell. The command line client “winget.exe” is already pre-configured to point to the Microsoft community repository.

winget install Windows Package Manager

winget install Windows Package Manager

Search for available packages

winget search APPLICATION

Display information about the packages

winget show APPLICATION

Install packages

winget install APPLICATION

Manage sources for packages

winget source (add/list/update/remove/reset)

Here is a quick look at some of the packages in the Microsoft Community repository.

winget show

winget show

Contribute and Feedback

Since the Windows Package Manager is open source, you can also contribute by sharing your feedback and suggestions on GitHub.

More information

You can find more information about the WinGet Windows Package Manager check out the Microsoft Docs and the preview announcement blog post. If you have any questions, feel free to leave a comment below.

 



How to SSH into an Azure VM from Windows Terminal Menu

How to SSH into an Azure VM from Windows Terminal Menu

A couple of days ago, I released a blog post on how you can add a PowerShell remote session in the Windows Terminal menu. In my example, I created a menu item in Windows Terminal to use PowerShell remoting to connect to an Azure virtual machine (VM). In the meantime, I got a lot of questions on how you can add an SSH connection to an Azure VM in the Windows Terminal. That is why I am going to share here, how you can add an SSH connection to an Azure VM in the Windows Terminal menu.

Scott Hanselman wrote a great blog post on how you can add tabs to open an SSH connection, so I highly recommend that you read his blog for all the details.



PowerShell Remoting over SSH in PowerShell 7

Enable PowerShell SSH Remoting in PowerShell 7

In this blog post, we will have a look at how you can enable and set up PowerShell SSH Remoting or PowerShell Remoting over SSh with PowerShell 7. With PowerShell Core 6, Microsoft introduced PowerShell 7 Remoting over SSH, which allows true multiplatform PowerShell remoting between Linux, macOS, and Windows. PowerShell SSH Remoting creates a PowerShell host process on the target machine as an SSH subsystem. Normally, Windows PowerShell remoting uses WinRM for connection negotiation and data transport. However, WinRM is only available on Windows-based machines.

There are also some downsides to it. SSH-based remoting doesn’t currently support remote endpoint configuration and JEA (Just Enough Administration). It is also important to understand that this is not just another PowerShell SSH client.

Use SSH Transport with PowerShell Remoting

To use PowerShell 7 remoting with SSH on Windows, Linux, and macOS machines, you can use the same cmdlets you are already familiar from Windows PowerShell remoting with WinRM.

  • New-PSSession
  • Enter-PSSession
  • Invoke-Command

There are three new parameters for these cmdlets if you are using PowerShell SSH remoting.

  • -HostName (Instead of -Computername, you define the SSH target)
  • -UserName (Instead of -Credentials you use the -UserName parameter)
  • -KeyFilePath (If you are using SSH key authentication you can use the -KeyFilePath parameter to point to the key file)
New-PSSession -HostName tomsssh.server.com -UserName thomas


Customize Windows Terminal

My Customized Windows Terminal Settings.json

This is just a very quick blog post to share my customized Windows Terminal settings.json, and it should give you an idea of how you can customize the Windows Terminal for your needs. The new Windows Terminal for Windows 10 which is open-source and you currently can get it from the Windows Store. The new Windows Terminal lets you run different shells like Windows PowerShell, PowerShell 7, Command Prompt, WSL, and also WSL 2. It provides a couple of improvements like; multiple tabs support, GPU accelerated DirectWrite/DirectX-based text rendering engine, and much more. For me, one of the biggest advantages are the advanced customizing and configuration options, which allow you to configure the Windows Terminal settings using a profiles.json file.

Windows Terminal 1.0 was released on May 19, you can find more documentation here on Microsoft Docs.

I already shared a couple of blog posts on how you can customize your Windows Terminal experience:

Customized Windows Terminal Settings profiles json

Customized Windows Terminal Settings settings json



Add a PowerShell Remoting Session in the Windows Terminal Menu

Add a PowerShell Remote Session in Windows Terminal

I am sure you have heard about the new Windows Terminal, which is in preview, and you can get it from the Windows Store. In this blog post, I want to share how you can add a PowerShell remote session to the drop-down menu in the Windows Terminal when you open a new tab. The new Windows Terminal is highly customizable and it allows you to run different shells like the classic command prompt, Windows PowerShell, PowerShell 7, and also Windows Subsystem for Linux shells (I am using, for example, Ubuntu with the Windows Subsystem for Linux 2 (WSL 2)).

Scott Hanselman wrote a great blog post on how you can add tabs to open an SSH connection directly, so why not do the same thing with PowerShell? In my example, I will add a tab in Windows Terminal, which opens up a PowerShell remoting session (using WS-Management WSMan) to an Azure virtual machine (VM). However, this would work with every other machine which you can access using PowerShell Remoting.

Add a PowerShell Remote Session in Windows Terminal Tab

To get started, we need to open up the settings of the Windows Terminal. This will open up a settings.json file, which you can edit in your favorite editor, for example, Visual Studio Code. To add new “menu items,” you will need to add a profile to the profiles array in the JSON file. In my case, I will add two to different menu items, once I am going to do a PowerShell remoting session to an Azure VM using Windows PowerShell and in the other, I am going to use PowerShell 7.

Windows Terminal Settings profiles

Windows Terminal Settings profiles

You can see here the following to profile entries:

Remote Session using Windows PowerShell 5.1

{
"name":  "PS Thomas AzureVM",
"tabTitle": "PS Thomas Maurer AzureVM",
"commandline": "powershell.exe -NoProfile -NoExit -Command Enter-PSSession -ComputerName azurevmps.westeurope.cloudapp.azure.com -Credential thomas",
"icon": "C:/Users/thoma/Downloads/AzureVMIcon32.png"
},

Remote Session using PowerShell 7

{
"name":  "PS Thomas AzureVM",
"tabTitle": "PS Thomas Maurer AzureVM",
"commandline": "pwsh.exe -NoProfile -NoExit -Command Enter-PSSession -ComputerName azurevmps.westeurope.cloudapp.azure.com -Credential thomas",
"icon": "C:/Users/thoma/Downloads/AzureVMIcon32.png"
},

As you can see, we define the profile name and the tab title in for the Windows Terminal entry. We have the command line command here, which starts the PowerShell remoting session. The command opens a PowerShell session to a specific computer or server using the ComputerName parameter and the Credential parameter for the credentials. In my case, I am connecting to an Azure VM with the name azurevmps.westeurope.cloudapp.azure.com (could also be an IP address) and the username Thomas. The last thing I add is a small icon (32×32 pixel) since I am connecting to an Azure VM, I took the Azure VM icon.

In this scenario, I am using PowerShell Remoting over HTTP, you can use the same thing for your connections using PowerShell Remoting over HTTPS or even PowerShell Remoting over SSH which are way more secure, and should be used for your connections. If you are looking to create the same Windows Terminal menu entry using a simple SSH connection, check out my blog post here.

Now your Windows Terminal drop-down menu will look like this:

Add a PowerShell Remote Session in Windows Terminal Tab

Add a PowerShell Remote Session in Windows Terminal Tab

By selecting one of these profiles, you will automatically open a PowerShell remoting session to a specific computer or server in Windows Terminal.

Windows Terminal - Azure virtual machine VM PS Remote Session

Windows Terminal – Azure virtual machine VM PS Remote Session

I hope this gives you an idea of how you can add a PowerShell remote session in Windows Terminal menu. If you want to know more about the Windows Terminal, check out the following blog, and if you have any questions, please feel free to leave a comment.

If you want to know more about what’s new in PowerShell 7, or if you want to learn more about how to customize the Windows Terminal, check out my blog.