Tag: cmd

Cascadia Code in Windows Terminal

Change the Windows Terminal Theme from Light to Dark

This is again a very small post on the Windows Terminal, like how to open the Windows Terminal from the command prompt or run and how to change the Windows Terminal background image. This time I got asked about how you switch the Windows Terminal Theme from light to dark. Well, the answer is pretty simple. The theme of the Windows Terminal is defined by the Windows 10 color theme. So to change the Windows Terminal theme from light to dark, you simply need to change the default app mode to dark or switch completely switch to dark in the Windows 10 personalization settings. Not like other Windows 10 apps, after you have switch the color mode, you will need to close and reopen the Windows Terminal to see the change.

The Windows Terminal is currently in preview and lets you run shells like the classic command-line, PowerShell or WSL and WSL 2. If you want to know how to install the Windows Terminal, check out my blog post.

Change to Windows Terminal Dark Theme

Here is how you change it to the dark theme.

  1. Open Windows 10 Settings
  2. Go to Personalization
  3. Click on Colors
  4. Choose your color and select “Dark
Windows Terminal Dark Theme

Windows Terminal Dark Theme

 

Activate Light Theme

Here is how you change it to the light theme.

  1. Open Windows 10 Settings
  2. Go to Personalization
  3. Click on Colors
  4. Choose your color and select “Light
Windows Terminal Light Theme

Windows Terminal Light Theme

I hope this is a quick help, also check out my blog post about the new font called Cascadia Code. If you have any questions, please let me know in the comment.



Download the new Windows Terminal Preview

How to open Windows Terminal from Command Prompt or Run

This is a really short blog post and more of a reminder than anything else. You might have seen the new Windows Terminal for Windows 10 was just released in the Windows Store as a preview. However, in the last couple of updates to the Windows Terminal app, it got to a state which already makes it my default terminal. The Windows Terminal allows you to run Windows PowerShell, PowerShell Core and even Bash using the Windows Subsystem for Linux (WSL). Especially the integration of the Azure Cloud Shell is a great plus for me. In this blog post, I am just going to show you how you can open the Windows Terminal from command prompt or Run (WIN + R).

To open Windows Terminal from the command line (cmd) or in Windows Run (WIN +R) type:

wt
Open Windows Terminal start wt

Open Windows Terminal start wt

 

If you want to know more about the Azure Cloud Shell integration, read the blog of Pierre Roman (Microsoft Cloud Advocate) on the ITOpsTalk blog.



netsh wireless password

Show Wireless Network Password on Windows 10

Today I have a simple blog post, which is more less just a note for myself. If you are join your Windows 10 device to a Wireless Network and you can’t remember the Wireless Password or Key you can recover this using the netsh command. Simply run this command to show the network key of the wireless network:

 
netsh WLAN show profile name="WirelessNetwork" key=clear

To list the wireless networks you have access to, you can use the following command:

 
netsh WLAN show profiles


Azure Cloud Shell

Azure Cloud Shell – shell.azure.com and in Visual Studio Code

Back in May Microsoft made the Azure Cloud Shell available in the Microsoft Azure Portal. Now you can use it even quicker by just go to shell.azure.com. First you login with your Microsoft account or Work and School account, and if your account is in multiple Azure Active Directory tenants, you select the right tenant and you will be automatically logged in. So even if you are on a PC where you can not install the Azure CLI or the Azure PowerShell module, you can still easily fire up a shell where you can run the Azure CLI, Azure PowerShell and other CLI tools like Docker, Kubectl, emacs, vim, nano, git and more.

In addition you can also open up Azure Cloud Shell directly from Visual Studio Code

Azure Cloud Shell Visual Studio Code

With that, enjoy your holidays and I wish you a good start in the new year!



Tar and Curl on Windows 10

Today Microsoft released Windows 10 Insider Preview Build 17063 which includes a lot of great new features like Timeline, Activities, Microsoft Edge, Windows Subsystem for Linux improvements and much more. But Microsoft also included something for IT Pros and Developers. After the OpenSSH client and the OpenSSH server. Microsoft brings two new command-line tools for the Windows toolchain: curl and bsdtar. These tools are very well known tools in the open source world. Including them in Windows should make Windows even a better development platform.

 

Tar on Windows 10
Tar: A command line tool that allows a user to extract files and create archives. Outside of PowerShell or the installation of third party software, there was no way to extract a file from cmd.exe. We’re correcting this behavior 🙂 The implementation we’re shipping in Windows uses libarchive.

curl on Windows 10

Curl: Another command line tool that allows for transferring of files to and from servers (so you can, say, now download a file from the internet).

Why this, so first of all you have PowerShell which has similar functionality, but PowerShell is not always available (Think about Nano Server container images where you have not the Full .Net Framework available). Secondly Developers which come from other operating systems are already familiar with these tools and they can use, as they would on their “old” operating system.

If you want to know more, check out Craig Wihite’s (Microsoft) blog post: Tar and Curl Come to Windows!

As mentioned this is included in the Windows 10 Insider Preview Build 17063 and should ship to production customers in the next Windows 10 release, which might be Windows 10 (1803).



cmd clip

Pipe cmd prompt commands into the clipboard

This is a very all but very useful command if you work with the Windows Command Prompt. This allows you to output text from commands into the Windows clipboard.

 
dir | clip

Scott Hanselman from Microsoft just reminded the community about this feature, which is available in Windows since Windows Vista.

PowerShell v5 got some similar command using Set-Clipboard and Get-Clipboard.

 
Set-Clipboard
 
Get-Clipboard


Transparent PowerShell Background in Windows 10

Transparent PowerShell Background in Windows 10

After some recent blog post, where I posted some screenshots of my PowerShell console, some people were asking about how I made the background of the PowerShell console transparent. Well, this is very simple, Microsoft changes a lot on the Command Prompt and PowerShell in Windows 10.

Right click on the title bar of the PowerShell console or CMD console and click on properties.

PowerShell Options

Now in the Colors tab, you can change the transparency of the console window using the opacity slider.

Transparent PowerShell Background in Windows 10

This also works with the command prompt (CMD) on Windows 10.