Category: PowerShell

New Windows Server Performance Monitor

New Performance Monitor for Windows Server

In this blog post, I am going to show you the new Windows Performance Monitor feature in Windows Admin Center. This feature was announced publicly at Microsoft Ignite 2019. But before we are going to have a look at the new Windows Admin Center Performance Monitor extension, it is time for some history. If you have worked with Windows or Windows Server in the past, you almost certainly have used a tool called perfmon.exe, or Windows Performance Monitor.

You can use Windows Performance Monitor to examine how programs affect your computer’s performance, both in real-time and by collecting log data for later analysis. It uses performance counters, event trace data, and configuration information, which can be combined into Data Collector Sets. Perfmon exists already for a long time. It is super powerful for troubleshooting Windows. However, it is definitely if you look at the classic MMC user-interface and the user-experience in general, probably not your favorite tool to use. That is why we needed something better.

Perfmon

Perfmon.exe

Windows Reliability and Performance Monitor is a Microsoft Management Console (MMC) snap-in that provides tools for analyzing system performance. From a single console, you can monitor application and hardware performance in real time, customize what data you want to collect in logs, define thresholds for alerts and automatic actions, generate reports, and view past performance data in a variety of ways.

You can find more about the classic perfmon.exe here.

A couple of weeks ago, I was contacted by Windows Server Program Manager Cosmos Darwin, who works at great features in Windows Server like Storage Spaces Direct. He asked me if I remember my feedback item in user voice, which I created a couple of years ago.

Windows Server Windows Admin Center User Voice Feedback

Windows Server Windows Admin Center User Voice Feedback

Back then, I wasn’t working for Microsoft, but I was working in a couple of different projects where we were using Windows Server and needed to build a real-time performance monitoring system. Which allowed us to monitor remote servers and clusters.

And here it is, the shiny new Windows Admin Center Performance Monitor extension. This new UI is integrated into the web-based Windows Admin Center management tool.

Windows Admin Center Performance Monitor

Windows Admin Center Performance Monitor

Using the Performance Monitor extension in Windows Admin Center uses the same performance data as perfmon, like performance counters, which means that it will just work with your existing configuration. However, it adds a couple of benefits. No worries, the classic perfmon.exe is still there for you to use it.

  • Easy Remoting ✔ – You can easily use it on your remote machine. Windows Admin Center uses PowerShell remoting in the background to connect to the remote computer.
  • Share Workspaces ✔ – You can create workspaces that you can save and use for multiple systems within the same Windows Admin Center instance. But you can also export them and import them on other Windows Admin Center gateway installations.
    Upload and Download Workspaces

    Upload and Download Workspaces

  • Search and highlighting ✔ – You can easily search for objects and counters. Performance Monitor also highlights the useful objects for your system. So you don’t have to guess which counter to use.
    Performance Monitor Search Counter

    Performance Monitor Search Counter

  • Different Graph Types ✔ – You can use different types of graphs, which make it easier to find and compare the right information depending on your scenario.
    Min-Max View

    Min-Max View

    Windows Server Performance Monitor Heatmap

    Windows Server Performance Monitor Heatmap

     

I hope this gives you a quick overview of the new Performance Monitor extension in Windows Admin Center. You can get Windows Admin Center from here. If you have any questions, feel free to leave a comment. There is also a short survey, about different tools like perfmon, this will directly influence the work on Windows Admin Center. You can check out the official announcement blog here.

By the way, Windows Admin Center also offers a great set of Azure Hybrid services integration. Check out my blog post and videos about the Azure Hybrid services in Windows Admin Center.



Azure Stack Migration Series YouTube Playlist

Learn about Azure Stack Migration in this Video Series

Together with Tiberiu Radu from the Azure Stack Product Group, I worked on a series of videos to show how you can migrate workloads to Microsoft Azure Stack. This includes basic workloads like Active Directory Domain Controllers, File Servers, and SQL Servers. We are not only adding videos about Azure Stack Migration, but we also added a couple of tips on how you can take advantage of some of the infrastructure-as-a-service (IaaS) features on Azure Stack, like Azure Resource Manager templates and extensions.

The journey to the cloud provides many options, features, functionalities, as well as opportunities to improve existing governance, operations, implement new ones, and even redesign the applications to take advantage of the cloud architectures.
This video series was created in the context of the End of Support (EOS) motion for Windows Server 2008/2008R2 and SQL Server 2008/2008R2, with the target to highlight some of the migration options. The EOS program could be a good opportunity to start this process and it’s not only about the lift-and-shift or move your servers and forget about them, instead it could be the start of a modernization journey. As part of the EOS motion, Azure VMs running Windows 2008/R2 and SQL 2008/R2 on Azure and Azure Stack, offer 3 years of free Extended Support Updates. That means you can enable the same operational processes, use ARM templates, and use the infrastructure-as-a-service (IaaS) platform on both Azure and Azure Stack, to start this journey.
– Tiberiu Radu

Azure Stack Migration Introduction

Check out my Azure Stack Migration introduction video, which will give you a quick overview of migrating workloads to Azure Stack.

Video Series

You can find the full playlist with the complete Azure Stack Migration video series on YouTube.

Azure Stack Migration Series YouTube Playlist

Azure Stack Migration Series YouTube Playlist

If you want to read more, check out my blog post on ITOpsTalk.com. There we have some detailed blogs on these videos. I also recommend that you check out the IaaS blog series from the Azure Stack team, which includes different features around running virtual machines on Azure Stack.

If you have any questions, please let me know in the comments.



Microsoft Ignite 2019 Bag

What’s in my bag for Microsoft Ignite 2019

For the last couple of Microsoft Ignite conferences (2015, 2017, 2018), I wrote a blog about what I will carry in my bag. I decided to do that again, and give you a quick look and share with you what’s in my bag for Microsoft ignite 2019 in Orlando. If you are a first-time attendee, you might enjoy a few tips on how I pack and what I take with me during the conference days. If you already a Microsoft Ignite veteran, you might still find some interesting tips you can use yourself. I am also interested to hear about your tips and what you are packing for Microsoft Ignite 2019.

I am super excited to meet with people from all around the world and help the team presenting and speaking in a couple of sessions and hosting some Channel9 live interviews. So if you are there, make sure you come over and say hi.

Let’s have a quick look at some of the things we keep in mind. First, attendees will get some SWAG like the Ignite backpack and a water bottle. So keep in mind that you might need to leave some space in your luggage on the day way back, and you might not need to bring your own backpack to the event since you will get one. Rick Claus and Joey Snow did a full video review on this year’s Microsoft Ignite 2019 conference backpack here.

The next thing you need to be aware of is that the Microsoft conference is enormous, and your sessions and meetings may be spread over the whole venue. You will walk a lot. It is crucial that you have good and comfortable shoes and save weight as much as possible when packing your bag.

What did I pack for Microsoft Ignite

I try to pack light, and this is what I bring to Microsoft Ignite 2019.

Microsoft Ignite 2019 Bag

Microsoft Ignite 2019 Bag

  • Same as last year, the primary devices this year will be the Microsoft Surface Go. Next to it being a notebook, tablet, and desktop replacement, it is very lightweight and small, which will not add a lot of weight. However, it still comes with a full Windows 10. This makes it a great device to carry it around the conference. And with OneNote, it should be great to take notes. I will have a look at the Surface Pro X, which will be available on November 5th, and it looks like a more powerful device then the Surface Go but still is thin and light. There will be a Microsoft pop-up store at Microsoft Ignite, and I hope that they have a couple of Surface Pro X devices available.
  • The Surface Pen, especially for conferences, workshops, and training, I like to take handwritten notes or draw things to discuss ideas and solutions with people.
  • Since I will do some serious work during Ignite, I will bring my Surface Book 2. The main reason for this is the screen size and performance. When I am working a couple of hours, a little bit more screen, real estate helps a lot.
  • The Surface Headphones and their noise-canceling feature is some real lifesaver. I like them especially when I travel and have long flights. But I also like that they now support Bluetooth so that I can connect wirelessly. I also use them regularly for conf calls.
  • I am also carrying the Samsung Galaxy Gear S3, which helps me tracks the steps I walk during Microsoft Ignite and the limited sleep I get during this event. Trust me, you will definitely walk a lot during that conference.
  • For presentations, I got a Microsoft USB-C to HDMI and VGA adapter. Since the Surface Book 2 and the Surface Go, both use USB-C for an external dongle, this makes it simple to carry just one type.
  • I just use one power adapter of the Microsoft Surface Book 2, which can power the Surface Go and the Surface Book 2. It also has an integrated USB port for charging the phone, speaker, and other stuff.
  • I will bring one of my Microsoft hoodies, which I quickly can put on and take off during the conference. As usual, you will experience some temperature differences between outside and inside. To quickly adjust to the right temperature, will not only make you happy but will also reduce the chance of you getting sick.
  • Next to that, I will bring some cables, sunglasses and a bunch of other stuff you need during a conference.

Now you have seen what I will be carrying, let me know what you pack in the comments.

Preparing is key; make sure you have a look at the session catalog and plan your session. You can always switch and go to another session, but making sure you know about the sessions you want to see, helps. Speaking about sessions, make sure you have a look at my session about Hybrid Management Technologies.

Nex to sessions there are other fun things to do:

  • Azure Developer and Architecture Center (DAC) where you can talk and meet with experts to discuss and listen to lightning talks
  • Channel 9 live shows and interviews
  • Microsoft Store
  • Expo Floor with a lot of partners and sponsors
  •  You can also take Microsoft Certification exams directly there, some of them even for free.
  • and much more

This was a quick look at what’s in my bag for Microsoft Ignite 2019. Let me know what your tips for Microsoft Ignite 2019 are in the comments.



Deploy and Configure Windows Admin Center in Azure VM

Deploy and Install Windows Admin Center in an Azure VM

The great thing about Windows Admin Center (WAC) you manage every Windows Server doesn’t matter where it is running. You can manage Windows Servers on-prem, in Azure or running at other cloud providers. Now if you want to use Windows Admin Center to manage your virtual machines running in Azure, you can use either an on-prem WAC installation and connecting it using a public IP address or a VPN connection, or you can deploy and install Windows Admin Center in Azure. This blog post will show you how you can deploy and install Windows Admin Center in an Azure virtual machine (VM).

How to deploy and install Windows Admin Center in an Azure virtual machine (VM)

With this guide, you can directly deploy and install a new Windows Admin Center gateway in an Azure VM. If you have already a VM deployed, you can also follow this guide to install Windows Admin Center manually. For the installation, we will use Azure Cloud Shell do run a PowerShell installation script.

Preparation

As mentioned we will run the installation script from Azure Cloud Shell. Optionally you can also install Azure PowerShell on your location machine and run the same steps for the installation on your local machine.

  1. Set up Azure Cloud Shell if you haven’t done it yet.
  2. Start the PowerShell experience in Cloud Shell.
  3. Optional: If you want to use your own existing certificate, upload the certificate to Azure Key Vault.

Installation

Now you can start with the installation process. First, you will need to download the installation script from the following URL. Navigate to your home directory and download the file using PowerShell.

Download Windows Admin Center with PowerShell in Cloud Shell

Download Windows Admin Center with PowerShell in Cloud Shell

# Navigate to your home directory
cd ~
 
# Download file
Invoke-WebRequest -Uri https://aka.ms/deploy-wacazvm -OutFile Deploy-WACAzVM.zip
 
# Expand Zip file
Expand-Archive ./Deploy-WACAzVM.zip
 
# Change Directory
cd Deploy-WACAzVM

After successfully downloading and unpacking the Windows Admin Center deployment script, you will need to modify a couple of parameters. I will use the default parameters to deploy a new Windows Server 2019 and generate a self-signed certificate. However, if you want to use other options, check out the script parameter list.

Configure Parameter

Configure Parameter

$ResourceGroupName = "demo-wac-rg"
$VirtualNetworkName = "wac-vnet"
$SecurityGroupName = "wac-nsg"
$SubnetName = "wac-subnet"
$VaultName = "wac-key-vault"
$CertName = "wac-cert"
$Location = "westeurope"
$PublicIpAddressName = "wac-public-ip"
$Size = "Standard_D4s_v3"
$Image = "Win2019Datacenter"
$Credential = Get-Credential
 
$scriptParams = @{
ResourceGroupName = $ResourceGroupName
Name = "wac-vm1"
Credential = $Credential
VirtualNetworkName = $VirtualNetworkName
SubnetName = $SubnetName
Location = $Location
Size = $Size
Image = $Image
GenerateSslCert = $true
}
./Deploy-WACAzVM.ps1 @scriptParams

This will deploy a new Azure virtual machine with Windows Admin Center installed and open the specific port 443 on the public IP address. You can find more install options and parameters to install WAC on an existing virtual machine or with an existing certificate on Microsoft Docs.

Deploy and Configure Windows Admin Center in Azure VM

Deploy and Configure Windows Admin Center in Azure VM

After the deployment has finished, simply click on the URL or IP address and it will open the Windows Admin Center portal.

Windows Admin Center Running in Microsoft Azure

Windows Admin Center Running in Microsoft Azure

I hope this gives you an overview about how you can deploy Windows Admin Center in an Azure VM. If you have any questions, please let me know in the comments.



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.



Cascadia Code in Windows Terminal

New Microsoft Code and Terminal Font Cascadia Code

Cascadia Code is the latest monospaced font shipped from Microsoft focusing on delivering an excellent font for command-line experiences and code editors like Visual Studio Code. The Cascadia Code font was first announced at the Microsoft Build conference in May 2019. And yesterday, Microsoft just released Cascadia Code version 1909.16 and it is available publicly on GitHub. Cascadia Code makes an excellent font for the Windows Terminal, and you can download it today.

It is the latest monospaced font shipped from Microsoft and provides a fresh experience for command line experiences and code editors. Cascadia Code was developed hand-in-hand with the new Windows Terminal application. This font is most recommended to be used with terminal applications and text editors such as Visual Studio and Visual Studio Code.

I took some time to install Cascadia Code font on my Surface Book 2 and it works great with application like Visual Studio Code and the Windows Terminal running PowerShell. To start using it, simply download the font, install it, and configure the application to use is. In the Windows Terminal app, open the settings.json file and change the font in the specific terminal profile.

VS Code Cascadia Code setting for Windows Terminal

VS Code Cascadia Code setting for Windows Terminal

  "profiles" : 
    [
        {
            "acrylicOpacity" : 0.5,
            "closeOnExit" : true,
            "colorScheme" : "VibrantInk",
            "commandline" : "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
            "cursorColor" : "#FFFFFF",
            "cursorShape" : "bar",
            "fontFace" : "Cascadia Code",
            "fontSize" : 12,
            "guid" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
            "historySize" : 9001,
            "icon" : "ms-appx:///ProfileIcons/{574e775e-4f2a-5b96-ac1e-a2962a402336}.png",
            "name" : "PowerShell Core",
            "padding" : "0, 0, 0, 0",
            "snapOnInput" : true,
            "startingDirectory" : "%USERPROFILE%",
            "useAcrylic" : true,
            "backgroundImage": "C:/Users/thoma/OneDrive/Pictures/Me/Thomas Maurer Logos 2016/WindowsTerminal/Black Cloud Robot.png",
            "tabTitle": "PowerShell Core "
        },

If you want to know more about customizing the Windows Terminal, check out my blog post. If you are optimizing and customizing your code editor experience, you should also have a look at my favorite themes for Visual Studio Code.

The font is open source and licensed under the SIL Open Font license on GitHub, so it is easy to contribute. Have you tried the Cascadia Code font, and what do you think about the new coding font? Do you like it? And if you have any questions, please let me know in the comments.

If you are looking for some other cool Microsoft coding projects, have a look at Azure Cloud Shell and PowerShell 7.



Ping Azure VM Public IP address

How to enable Ping (ICMP echo) on an Azure VM

This is just a very quick blog post because I got the question from a couple of people. In this blog post want to show you how you can enable ping (ICMP) on a public IP address of an Azure virtual machine (VM). First, just let me say that assigning a public IP address to a virtual machine can be a security risk. So if you do that, make sure you know what you are doing. If you need admin access to virtual machines only for a specific time, there are services like Azure Just-in-Time VM Access (JIT) and Azure Bastion you should have a look at. Now back to the topic, Azure by default denies and blocks all public inbound traffic to an Azure virtual machine, and also includes ICMP traffic. This is a good thing since it improves security by reducing the attack surface.

Azure Network Security Group Port Rules Deny All Inbound Traffic to Azure VM

Azure Network Security Group Port Rules Deny All Inbound Traffic to Azure VM

This also applies to pings or ICMP echo requests sent to Azure VMs.

Ping Azure VM failed

Ping Azure VM failed

However, if you need to access your application from a public IP address, you will need to allow the specific ports and protocols. The same applies to the ICMP (Internet Control Message Protocol) protocol. The ICMP protocol is typically used for diagnostic and is often used to troubleshoot networking issues. One of the diagnostic tools using ICMP is ping, which we all know and love.

What do I need to do to be able to ping my Azure virtual machines (VMs)

Overall we need to do two main steps:

Configure Network Security Group (NSG) to allow ICMP traffic

So here is how you enable or allow ping (ICMP) to an Azure VM. Click on add a new inbound port rule for the Azure network security group (NSG).

Enable Ping ICMP in a NSG on an Azure VM

Enable Ping ICMP in an NSG on an Azure VM

Change the protocol to ICMP. As you can see, you can also limit the sources which can make use of that rule, as well as change the name and description. You can also use the following Azure PowerShell commands to add the inbound security rule to your NSG.

Get-AzNetworkSecurityGroup -Name "AzureVM-WIN01-nsg" | Add-AzNetworkSecurityRuleConfig -Name ICMP-Ping -Description "Allow Ping" -Access Allow -Protocol ICMP -Direction Inbound -Priority 100 -SourceAddressPrefix * -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange * | Set-AzNetworkSecurityGroup
Configure Network Security Group PowerShell

Configure Network Security Group PowerShell

Set up the operating system to answer to Ping/ICMP echo request

If you haven’t already configured the operating system that way, you will need to allow ICMP traffic, so the operating system response to a ping. On Windows Server, this is disabled by default, and you need to configure the Windows Firewall. You can run the following command to allow ICMP traffic in the Windows Server operating system. In the Windows Firewall with Advanced Security, you can enable the Echo Request – ICMPv4-In or Echo Request ICMPv6-In rules, depending on if you need IPv4 or IPv6.

Windows Firewall Enable Ping

Windows Firewall Enable Ping

You can also run the following command to do that:

# For IPv4
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol="icmpv4:8,any" dir=in action=allow
 
#For IPv6
netsh advfirewall firewall add rule name="ICMP Allow incoming V6 echo request" protocol="icmpv6:8,any" dir=in action=allow

After doing both steps, you should be able to ping your Azure Virtual Machine (VM) using a public IP address.

Ping Azure VM Public IP address

Ping Azure VM Public IP address

I hope this helps you be able to ping your Azure VMs. If you have any questions, please let me know in the comments.