Tag: Windows

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 profiles.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.

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, check out my blog.



What's new in PowerShell 7

What’s new in PowerShell 7 – Check it out!

As you know, the PowerShell team just released the new PowerShell version called PowerShell 7. PowerShell 7 will brings a couple of new features and enhancements not only for users who used PowerShell Core 6 but also for people who are currently using Windows PowerShell 5.0. I want to quickly give you an overview of what’s new in PowerShell 7.

New feature enhancements – What’s new in PowerShell 7

There are many enhancements in PowerShell 7 to make it the best PowerShell version yet. It is almost impossible to list all of them in one single blog post, so I will focus on the once, which are the most important once for me.

Out-GridView, -ShowWindow and other GUI cmdlets are back on Windows

With .NET Core 3 brining back WPF support on Windows, the PowerShell team was able to bring back some of the popular graphical tools and cmdlets like Out-Gridview, Show-Command, and the Get-Help -ShowWindow.

Show-Command PowerShell 7

Show-Command PowerShell 7

ForEach-Object -Parallel

Since I started using PowerShell and get into working with objects, ForEach-Object was one of the most critical cmdlets. By adding the -Parallel parameter to the ForEach-Object cmdlet, you can execute a scriptblock in parallel, similar to the option we had with PSWorkflow. With that performance can get so much better if you are working with a broad set of objects. You can also optionally set the maximum threads, which will be used in parallel (the default thread count is set to 5) with the -ThrottleLimit parameter.



Presenting and Creating Great Tech Demos

How to Create Great Tech Demos and Presentations

I didn’t keep track of the exact number, but I did many presentations at different conferences around the world. Since I am doing a lot of tech presentations and demos, I am always looking at how I can improve and get better. I start to realize that there are a lot of things you need to consider when delivering tech demos during presentations, to make it better for the audience. I started to work on my demos a lot, and I realized that these things also work when you are recording demo videos or screencasts. That is why I came up with the idea to write this blog post with tips and tricks on how you can create great tech demos and presentations.

Create and tell a story, make sure people can see the result 🎬

People have a short attention span, so if you are switching to your tech demo, and in the first couple of seconds, your audience is already lost because they cannot read what is on the screen or they have no context at all, you lost them for good. You need to make sure you create and tell a story, and you show them how to solve a specific challenge. A tech demo is not just good if you can show how you address a particular challenge, but people need to understand it. For example, I have seen many tech demos, that tell you here is the problem, here is the setting to solve it, and done. They didn’t complete the full demo and showed that it is now working. Yes, of course, sometimes showing the setting is enough, but a lot of times you want to show here is the challenge, it is not working now, I do this, and now you can see it is working. This gives attendees a way better experience and understanding of your demo.

Create video recordings of your demos 📽

Live demos are great, but sometimes it is just not possible, or the experience of the attendees isn’t great. For example, if you start a task that takes 5-10 minutes to complete, you don’t want to wait for it to complete as your time is limited in a session. Which leaves you with three options. The first option, you prepare an already finished scenario to jump on like they do in cooking shows. Secondly, you show something else and let the task complete in the background, and jump back to it once it’s done. And the third one, you cut a video before and use your video editing skills to make the waiting time shorter. While option one and two, often work, I realized that jumping away from a specific scenario or using another object which already completed, may confuse people, they lose context and doesn’t give them a great experience. Recording a video can help with that. For example, one of my demos is replicating a virtual machine named VM1, and these can take 30mins to even a couple of hours. I could have prepared a VM2, which would have been already replicated and move on with that one. However, during a lot of presentations, I realized it makes it easier to follow for people if I can use the exact same VM name, during the whole demo.

Creating videos also has an advantage when you run into issues. This can be due to lousy conference Wi-Fi or something just broke out of your control. Even if you plan to do the demo live, it is always great to have a backup, especially if you are doing a demo-heavy presentation, where things build on top of each other.

Resolution and Scaling 💻

You can have the most fabulous demo of all time, but if people can’t see it, it doesn’t matter at all. Rule number one, if you have to ask if people can read it, people can’t read it. So make sure that you are 100% sure that people can see what is going on. My recommendation is, please set your screen resolution to whatever the projector supports. Most of the time, this will be Full HD 1080p (1920×1080) resolution.

Presentation Demo Screen Resolution and Scaling

Presentation Demo Screen Resolution and Scaling

Early in the days, we didn’t have scaling in Windows, so people were using lower resolutions to make everything appear bigger. Guess what, Windows 10 supports scaling, so I usually use Full HD (1920×1080) and 150% scaling, this makes an excellent size to see what is going on the screen but also makes the picture sharp and not blurry. Most of the applications can handle it, and most of the web portals also work the ways they should. That said, I know that not all applications and scenario scale very well. Depending on what you are showing, you need to decide how you want to present it.

Use ZoomIT, and use it wisely 🔎

One of the most excellent tools for presentations is Sysinternals ZoomIT by Mark Russinovich (not PowerShell this time, sorry Jeffrey 😉). ZoomIT is a screen zoom and annotation tool for technical presentations, and as the name says, it lets you zoom. This helps you not just to make things more readable, but also to highlight a specific part of the screen, to show people where they need to focus on.

ZoomIt is a screen zoom and annotation tool for technical presentations that include application demonstrations. ZoomIt runs unobtrusively in the tray and activates with customizable hotkeys to zoom in on an area of the screen, move around while zoomed, and draw on the zoomed image. I wrote ZoomIt to fit my specific needs and use it in all my presentations.

ZoomIt works on all versions of Windows and you can use pen input for ZoomIt drawing on tablet PCs.

ZoomIt

ZoomIt

While ZoomIT is excellent, you need to know how to use it right. Place the mouse where you want to zoom and then zoom in, don’t move the mouse too much after you have zoomed in, you don’t want people to become sick 😵. As you can see, ZoomIT also allows you to do screen annotations, to mark specific things on the screen. Again, use this feature wisely before you start painting on the screen. The great thing about it, you can also use a pen, like the Surface Pen, to draw on your screen.

Font Size and Editor Light Theme 🔠

Okay, one of the many problems I see with many tech presentations is happening when people show code. Coming back to what I said earlier, if you have to ask the audience if they can read it, they can’t read it, so please use a font size they can easily read. Even in Notepad and Terminal, you can easily zoom these days with CTRL + Mousewheel.

Notepad Zoom

Notepad Zoom

If you are showing code in an editor or even in a web portal, a dark theme makes you look cool. However, it is horrible to read. So please help the audience and use a light theme in your editor like Visual Studio Code or in the Azure portal.

Light Theme Editor

Light Theme Editor

By the way, I am not saying that you only should use light PowerPoint slides. Dark PowerPoint slides can be a very powerful tool if they are used right. However, for editors, it is just very simple and way better to view if you are using a light theme. One of my favorite Visual Studio Code themes to present is the PowerShell ISE theme. This theme gives you a simple and light theme, with great color options for syntax highlighting.

Clean up 🧹

You want to make sure that people in your presentation and during your demonstration are focusing on the right thing and don’t get distracted by any clutter. So before your presentation, make sure you clean up:

Close all unnecessary applications

Especially any messengers like Microsoft Teams or Slack, you don’t want to receive any notifications at all during your presentation (Except you are showing Microsoft Teams demos 😉). By shutting down all these applications, you also make sure that you have enough resources like Memory available.

Turn off notifications

Focus assist

Focus assist

In Windows 10, you have a feature called Focus assist, and this allows you to pause all notifications on your PC.

Hide all icons from your desktop

Hide Desktop Icons

Hide Desktop Icons

Yes, there is an option for that! Right-click on your desktop -> View -> Show Desktop Icons.

Browser

Browser

Browser

If you are doing a demo using a browser, make sure your browser is also cleaned up, hide your Favorites Bar, and any additional browser extensions, which might take the focus away.

Taskbar

Keep your taskbar clean, you don’t want people to focus on all the icons there and the program you have installed. You want to make sure there is as little distraction as possible.

Hide System Icons and Time

Windows 10 Turn system icons off

Windows 10 Turn system icons off

This might not always be needed, but if you want to make it cleaner and especially during video recordings, you can also hide the system icons and time. If you are opening the settings app and search for system icons, you can go and hide them.

Full screen

This is a simple one, but if you do a presentation, you don’t want your windows overlapping each other and be confusing, so run your applications in full screen. Exception for this is when you want to show two things in comparison to each other.

Use the Azure Mask browser extension for your Azure demos

If you are doing demos in the Microsoft Azure Portal, you want to have a look at the Azure Mask browser extension. This is a browser extension that will mask GUIDs (such as Subscription IDs), email addresses, keys, and connection strings with a blur. The extension intends to make it easier to do screen recordings without revealing sensitive personal account information that may show up on the screen. It will only run and apply against Azure portal URLs. It’s available in Chrome, Firefox, and also works with the new Microsoft Edge (Chromium).

Virtual Desktops to switch to your tech demo 💻

I am a huge fan of the Virtual Desktop feature in Windows 10. This basically gives you unlimited desktops on your Windows 10 PC, which is excellent for productivity. But I am also using Virtual Desktops during presentations, for example, for switching between the PowerPoint deck to a demo. One the first desktop, I keep my PowerPoint presentation in full screen open, and with CONTROL + WINDOWS + ARROW RIGHT/LEFT, I can switch to other desktops where I, for example, already have my demos ready. You can create new Virtual Desktops by pressing WINDOWS + TAB. This makes switching between PowerPoint and demonstrations, less messy.

Virtual Desktop

Virtual Desktop

If you are presenting somewhere, where you can plug in two devices, you can also use the display switch to switch from your presentation machine to your secondary demo machine, which will have a similar effect. However, a lot of smaller events, don’t have that setup. By using the Virtual Desktops feature, you can clean up the process of switching to different technical demonstrations.

Change Desktop Backgrounds and console colors 🎨

Use different Colors

Use different Colors

If you do a presentation with multiple systems or consoles, you want to make sure people can follow on which system you are working. For example, if you have two different systems deployed to servers, you want to make sure people can easily identify which server runs which application. For example, you can change the color of the terminal or desktop background of VM1 to blue and the one of VM2 to red. If you are working with Windows, you might also use Sysinternals BgInfo, to write the name of the system on the desktop wallpaper.

The mighty Mouse pointer 🖱

Mouse Pointer

Mouse Pointer

If you want to explain something and point to something on the screen, the mouse cursor is a natural option. However, you can also do a lot of damage by using it wrong. First, make sure people can see the mouse pointer. In Windows 10, you can change the size and color of the mouse pointer, so people can easily identify it on the screen. Next, don’t move it fast and don’t go crazy. Move the mouse cursor slow and don’t try to circle things or jump around the screen with it; people will go nuts.

In many cases, it is better to use a tool like ZoomIT, to annotate on the screen.

Laser pointer in PowerPoint 👉

PowerPoint Laser Pointer

PowerPoint Laser Pointer

Many people use PowerPoint for their presentations. However, not many people know that PowerPoint can be an excellent presentation tool. It comes with a lot of features people don’t even know about, and with many of them, it is with any tool in the world; if you are using it wrong, it will not help you at all. One of the tools I want to highlight is the laser point feature in PowerPoint. If you are a presenter, you might have these remote presenters with a laser pointer on it, where you can point on a wall or projected screen. However, in many cases, that is not a good idea. Often the laser pointer is too small for people to see it or in some locations, you have multiple projectors, and you can’t point at all of them at once. PowerPoint can help you with that. You can use a simple on-screen laser pointer to highlight parts of your slides. This comes handy when you show a large technical diagram, which we often try to avoid, but in some cases, it is necessary.

Get prepared 🔧

To deliver great demos, you will need to practice them. First of all, you need to make sure that they actually work, but also that the timing is right. No one wants to wait and watch at the screen for five minutes until something has completed. I usually run through the demo at least twice before my presentations, to make sure that the demo also works multiple times. I usually also run through it a couple of minutes or hours before I go on stage. Especially with demos running in the cloud, I want to make sure that they are still working. It is not just about cloud technologies that can change fast; for example, I also saw software and container images expire.

What if something goes wrong? 👻

Even if you did prepare like crazy, there can always something go wrong. Don’t worry, people understand that things can break. As long as you are prepared, handle it the right way and have a backup plan, you will be fine. If something doesn’t work, you can try to troubleshoot it quickly. But don’t spend too much time on it and move on to the next one, because the audience doesn’t want to see you troubleshooting for minutes. In some cases, the audience can’t even see or doesn’t even realize that the demo didn’t work. In that case, don’t point it out, just move on if the demo is not essential to your presentation.

Conclusion to create Tech Demos and Presentations 😎

I hope you enjoyed my tips on how you can create great technical (tech) demonstrations (demos) and presentations. Let me know what your favorite tips and tricks for great tech demos are!



Surface Pro X Windows 10 on ARM WSL 2

How to Install WSL 2 on Windows 10 on ARM

This is just a quick blog post about the experience on running the Windows Subsystem for Linux 2 (WSL 2) on Windows 10 on ARM, which comes on devices like the Surface Pro X. Since I got many questions from developers and IT Pros about the Surface Pro X and how it can handle different workflows on Windows 10 on ARM, I decided to write a blog post, on how you can install WSL 2 on Windows 10 on ARM and the Surface Pro X.

Requirements

You need a device that runs Windows 10 on ARM like the Surface Pro X. Yes, WSL 2 works on the Surface Pro X, and you can run Ubuntu 18.04, which comes as an ARM compiled distro. But you will need to install at Windows Insider build (19041 or higher, also known as Windows 10 20H1 or Windows 10 version 2004). And yes, if you are running an Intel or AMD based machine, you can also install and run WSL 2 on Windows 10.

Install Windows 10 on ARM Windows Insider Build

Install Windows 10 on ARM Windows Insider Build

To run Windows 10 Insider Builds, you can go to Settings, Update & Security, and the Windows Insider Program and join the program. If you get asked to choose the Ring, you will need to select the Insider Slow Ring. You will need to reboot your machine and check for updates, to install the Windows Insider builds.

Install WSL 2 on Windows 10 on ARM

To install the Windows Subsystem for Linux 2 (WSL 2), you need to follow these tasks.

  • Enable the Windows Subsystem for Linux Optional feature (WSL 1 and WSL 2)
  • Install a distro for the Windows Subsystem for Linux
  • Enable the ‘Virtual Machine Platform’ optional feature (WSL 2)
  • Configure the distro to use WSL 2

Enable the Windows Subsystem for Linux and Virtual Machine Platform

Windows 10 on ARM Control Panel WSL2

Windows 10 on ARM Control Panel WSL2

You can enable the Windows Subsystem for Linux (WSL) and the Virtual Machine Platform feature in the Control Panel or with PowerShell.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
 
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

These commands will need a reboot of the machine.

Install a Linux distro for the Windows Subsystem for Linux

If you don’t already have installed a WSL distro, you can download and install it from the Windows 10 store. You can find more here: Crazy times – You can now run Linux on Windows 10 from the Windows Store.

Install Ubuntu ARM WSL 2 Windows Store on the Surface Pro X

Install Ubuntu ARM WSL 2 Windows Store on the Surface Pro X

If you want to run a full Ubuntu virtual machine on Windows 10 Hyper-V, you can check out my blog post.

Set WSL distro to use version 2

After you completed the first two steps, you will need to configure the distro to use WSL 2. Run the following command to list the available distros in PowerShell:

wsl -l -v

If this command doesn’t work with the -v parameter, you don’t have the right Windows 10 build installed.

To set a distro to WSL 2, you can run the following command:

wsl --set-version DistroName 2
Convert to WSL 2

Convert to WSL 2

You can also set WSL 2 as the default. You can also run the command before you start the Linux distro for the first time, which will give you faster setup speeds.

wsl --set-default-version 2

To find out more about installing WSL 2, check out the Microsoft Docs page.

After you have enabled WSL 2 you can see that WSL 1 was running kernel version 4.4.0.

WSL 1 Kernel Version

WSL 1 Kernel Version

 

WSL 2 is running Linux kernel version 4.19.84

WSL 2 Kernel Version

WSL 2 Kernel Version

You can also see, that this is an ARM version of Ubuntu.

Ubuntu ARM

Ubuntu ARM

Conclusion

I hope this helps you and gives you a quick overview on how you can install WSL 2 on Windows 10 on ARM and the Surface Pro X. If you have any questions, let me know in the comments and check out the WSL 2 FAQ. The Windows Subsystem for Linux 2 Kernel is also open-source, you can follow the project on GitHub.

By the way, you can now also start using Docker Desktop together with the Windows Subsystem for Linux 2 and even use WSL 2 on Windows Server.



Video Microsoft Ignite Live 2019 - Hyper-V Containers

Video Microsoft Ignite Live – Hyper-V and Containers

This is the last set of recordings of Microsoft Ignite Live stage recordings I am going to share. Today I am going to share two videos, in one I had the chance to speak with Craig Wilhite and Vinicius Apolinario about why you should care about containers and how to get started. In the second one, I spoke with Ben Armstrong from the Hyper-V team about some of the great fun bits the team is doing.

Video: Windows Container

A lot has been said about containers recently, but why should you care? Containers are not an “all or nothing” situation and understanding when they can be beneficial is key to a successful implementation. Come and learn from the containers team how you can get started with this technology and some tips and tricks that will help you with your containerization journey!

Video: Hyper-V

Ben Armstrong, Principal Program Manager on the Hyper-V team talks about some of the challenging, interesting, quirky, and just fun changes that have happened in virtualization over the last year.

I hope this gives you a quick look at some of the fun parts the Hyper-V team is doing with containers and Hyper-V. You can check out the following links to get more information:

Microsoft Ignite 2019 was a lot of fun, and you can also watch my session about Hybrid Cloud Management at Microsoft Ignite. If you have any questions, please let me know in the comments.



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.



Connect Azure VMs with Windows Admin Center

How to manage Azure VMs with Windows Admin Center

Windows Admin Center is a browser-based management tool to manage your servers, clusters, hyper-converged infrastructure, and Windows 10 PCs. You can deploy it anywhere you want. If you run on-prem, you can install it on a Windows Server running in your infrastructure, or you can also install Windows Admin Center on an Azure virtual machine (VM). In this post, we want to address scenarios where you have deployed Windows Admin Center on-premises, and you want to manage some Azure VMs. In this post, I am going to show you how you can manage Azure VMs with Windows Admin Center (WAC).

If you want to know more about Windows Admin Center in general, check out my blog post.

How to manage Azure IaaS VMs with your on-premises Windows Admin Center gateway

As mentioned before, you can also install a Windows Admin Center server running on Azure IaaS virtual machine, but more on that in another post. In this post, I will cover how you can connect to an Azure VM from your on-prem Windows Admin Center (WAC) installation. There are two ways you can connect from WAC to Azure VMs.

The first one would be using the public IP address of a virtual machine running in Azure. This would mean that you need to open the PowerShell remoting port in the network security group (NSG), to be able to connect. I wouldn’t recommend this scenario since this exposes your virtual machines to the public internet. However, if you want to know more about that solution, check out the Microsoft Docs.

What I wound recommend is that you use a VPN connection to connect to your Azure virtual network where your VM is running. However, I know that in a lot of cases, you might not have a Site-2-Site VPN connection to your Azure virtual network. To still be able to connect form Windows Admin Center to an Azure VM, you can use the Azure Network Adapter feature. The Azure Network Adapter will create a Point-2-Site VPN connection from your Windows Server to Azure. And we are going to use this feature on our WAC gateway, so the WAC gateway is able to reach the virtual machine in Azure.

Add Azure Network Adapter

Add Azure Network Adapter

First, you will need to add a new Azure Network Adapter. This can be done in the Network extension in Windows Admin Center. This will open up a wizard that will guide you through the setup and if needed also helps you to register WAC in Microsoft Azure.

Create Azure Network Adapter

Create Azure Network Adapter

The setup can take a while, depending on if you already have a VPN gateway in Azure or not. WAC will create all the necessary resources in Azure, and create the Point-to-Site VPN connection for you. Also, keep in mind that the VPN gateway is an additional resource and will have an additional cost.

Connect to an Azure Virtual network

Connect to an Azure Virtual network

Now you can add and connect to your virtual machine running in Azure, using the private IP address of the machine.

Connect Azure VMs with Windows Admin Center

Connect Azure VMs with Windows Admin Center

You add a server by directly entering the IP address or you can use the Add Azure Virtual Machine wizard, to discover the VM in your Azure subscription.

Add Azure VM in Windows Admin Center

Add Azure VM in Windows Admin Center

I hope this helps you to connect your Azure virtual machines security without exposing ports to the public internet. If you have a site-to-site VPN connection to your Azure virtual network, you can use this as well without the need of setting up Azure Network Adapter.

If you are interested in other Azure Hybrid services in Windows Admin Center, check out the following blog post including the video series: Configure Azure Hybrid Services in Windows Admin Center

Besides, you can also have a look at my other blog post about how to set up Azure hybrid cloud services.

If you want to download Windows Admin Center, check out the download page. If you have any questions, feel free to leave a comment.