Category: Windows Server

List Azure Arc Machines Agent Version in Azure Cloud Shell

Get the Azure Connected Machine Agent (Azcmagent) Version

Azure Arc Enabled Servers just got another update enabling extensions. This also includes an updated version of the Azure Arc agent or Azure Connected Machine Agent (Azcmagent). To get an overview of what Azure Arc Azure Connected Machine Agent is installed on your machines, you can use several different ways. In this blog post, we are going to have a look at how you can get installed Azure Connected Machine Agent (Azcmagent) version for Azure Arc Enabled Servers.

On the Azure Arc Enabled Server

If you want to check the Azure Connected Machine Agent (Azcmagent) version directly on your Azure Arc enabled server, you can simply run the following command in PowerShell.

azcmagent version

This will list the installed version.

Azure Connected Machine Agent azcmagent Version

Azure Connected Machine Agent azcmagent Version

In the Azure Portal

You can also see the agent version in the Azure Portal. If you browse to your Azure Arc Enabled Server, you can find the agent version on the overview page.

Azure Portal - Azure Arc Enabled Server

Azure Portal – Azure Arc Enabled Server

However, if you want to see the agent version for your Azure Arc enabled servers at scale, this isn’t an ideal option.

List Azure Connected Machine Agent (Azcmagent) version for all Azure Arc machines

If you want to see the installed Azure Connected Machine Agent (Azcmagent) version for all your Azure Arce enabled servers at scale, you can use Azure Resource Graph Queries.

This query lists all the Azure Arc enabled machines and shows the installed agent version.

List Azure Arc Machines with Agent Version

List Azure Arc Machines with Agent Version

You can run the following query in the Azure Resource Graph Explorer in the Azure Portal.

 resources
| where type == "microsoft.hybridcompute/machines"
| extend agentversion = properties.agentVersion
| project name, agentversion, location, resourceGroup, subscriptionId
| order by name

You can also run the query directly in Azure Cloud Shell or on your local machine using Azure PowerShell or the Azure CLI.

List Azure Arc Machines Agent Version in Azure Cloud Shell

List Agent Version in Azure Cloud Shell

Azure CLI

az graph query -q "Resources | where type =~ 'microsoft.hybridcompute/machines' | extend agentversion = properties.agentVersion | project name, agentversion, location, resourceGroup, subscriptionId"

Azure PowerShell

Search-AzGraph -Query "Resources | where type =~ 'microsoft.hybridcompute/machines' | extend agentversion = properties.agentVersion | project name, agentversion, location, resourceGroup, subscriptionId"

If you need an overview of what Azure Connected Machine Agents we have installed and which versions do exist in our environment, you can just use the following Azure Resource Graph query.

Azure Resource Graph Explorer Chart - Azure Arc Server Agent Version

Azure Resource Graph Explorer Chart

Azure Resource Graph Explorer

 resources
| where type == "microsoft.hybridcompute/machines"
| extend agentversion = properties.agentVersion
| summarize count() by tostring(agentversion)

Azure PowerShell

Search-AzGraph -Query "Resources | where type =~ 'microsoft.hybridcompute/machines' | summarize count() by tostring(properties.agentVersion)"

Azure CLI

az graph query -q "Resources | where type =~ 'microsoft.hybridcompute/machines' | summarize count() by tostring(properties.agentVersion)"

Conclusion

I hope this blog post provides you with a short overview of how you can make sure which agent versions you have installed on your Azure Arc enabled servers. To learn more about Azure Arc for servers, check out Microsoft Docs. If you have any questions, feel free to leave a comment.



Azure Arc Enabled Servers Extension Management

Azure Arc Enabled Servers Extension Management

Azure Arc for Server just got a couple of new features. In this blog post, we are going to have a look at the new feature on Azure Arc enabled servers called extension management. This new Azure Arc enabled servers features allows you not only to deploy extensions like the Custom Script Extension, or the Microsoft Monitoring Agent but also enable features like Azure Update Management, Inventory, Change Tracking, and more for your servers running in a hybrid environment.

Introducing Azure Arc
For customers who want to simplify complex and distributed environments across on-premises, edge and multicloud, Azure Arc enables deployment of Azure services anywhere and extends Azure management to any infrastructure.
Learn more about Azure Arc here.

Azure Arc enabled servers already could benefit from several Azure Resource Manager features like Tags, Policies, RBAC, and some Azure Management features like logs and Azure Policy. With the new update, you can start using more extensions.  With these extensions available, Azure Arc enabled servers also get features like Azure Update Management, Inventory, Change Tracking, and insights capabilities.

Azure Arc Azure Management Control Plane

Azure Arc Azure Management Control Plane

Azure Arc Enabled Servers Extension Management Video

You can also watch my summary video on YouTube.



Windows Server 2019 Inside Out Microsoft Press Book

Windows Server 2019 Inside Out Microsoft Press Book Available

My friend and colleague Orin Thomas just shared some fantastic news. His new book Windows Server 2019 Inside Out for Microsoft Press is now available. I was able to provide some early feedback during the writing process and I can tell you this book is a must-have if you are working with Windows Server 2019.

Dive into Windows Server 2019—and really put your Windows Serverexpertise to work. Focusing on Windows Server 2019’s most powerful and innovative features, this supremely organized reference packs hundreds of timesaving solutions, tips, and workarounds—all you need to plan, implement, or manage Windows Server in enterprise, data center, cloud, and hybrid environments. Fully reflecting new innovations for security, hybrid cloud environments, and Hyper-Converged Infrastructure (HCI), it covers everything from cluster sets to Windows Subsystem for Linux.

You can get the book on Amazon and you will learn how to:

  • Optimize the full Windows Server 2019 lifecycle, from planning and configuration through rollout and administration
  • Leverage new configuration options including App Compatibility Features on Demand (FOD) or Desktop Experience
  • Ensure fast, reliable upgrades and migrations
  • Manage Windows servers, clients, and services through Windows Admin Center
  • Seamlessly deliver and administer core DNS, DHCP, file, print, storage, and Internet services
  • Use the Storage Migration Service to simplify storage moves and configuration at the destination
  • Seamlessly integrate Azure IaaS and hybrid services with Windows Server 2019
  • Improve agility with advanced container technologies, including container networking and integration into Kubernetes orchestration clusters
  • Deliver Active Directory identity, certificate, federation, and rights management services
  • Protect servers, clients, VMs, assets, and users with advanced Windows Server 2019 security features, from Just Enough Administration to shielded VMs and guarded virtualization fabrics
  • Monitor performance, manage event logs, configure advanced auditing, and perform backup/recovery Windows Server 2019
Microsoft Inside Out Windows Server 2019 Book

Microsoft Inside Out Windows Server 2019 Book

If you got the new Windows Server 2019 Inside Out Microsoft Press book, let me know what you think!



HCSDiag.exe - Hyper-V Host Compute Service Diagnostics Tool

HCSDiag.exe – Hyper-V Host Compute Service Diagnostics Tool

As you know, Hyper-V is not just a server virtualization software anymore. Today, you can find Hyper-V technology across different operating systems, products, and services, like Windows Defender Application Guard, Windows Sandbox, Hyper-V Containers, or many more. Thanks to Ben Armstrong from the Hyper-V team, I found out that there is a tool in Windows to troubleshoot these Hyper-V containers called hcsdiag.exe or Hyper-V Host Compute Service Diagnostics Tool. The Hyper-V Host Compute Service Diagnostics Tool (HCSDiag.exe) is available in Windows 10 and Windows Server 2019 if you have the Hyper-V roles or virtualization features enabled, and can be helpful to troubleshoot Hyper-V containers, virtual machines (VMs), Windows Sandbox, Windows Defender Application Guard, Windows Subsystem for Linux 2 and more.

HCSDiag.exe - Hyper-V Host Compute Service Diagnostics Tool

HCSDiag.exe – Hyper-V Host Compute Service Diagnostics Tool

Let’s have a look at the HCSDiag.exe, which you can find in C:\Windows\System32. It provides you with a couple of different commands and options. However, keep in mind that not all features work with every type of container. Some features are limited to scenarios where the VM is being used under the same user context as the host, where it is all about protecting the host from the guest and not the guest from the host like in the server version of Hyper-V.

To install Hyper-V, check out the following posts:

HCSDiag.exe

hcsdiag <command> [options…]

  • list
    Lists running containers and VMs.
  • exec [-uvm] <id> <command line>
    Executes a process inside the container.
  • console [-uvm] <id> [command line]
    Launches an interactive console inside the container.
  • read [-uvm] <id> <container file> [host file]
    Reads a file from the container and outputs it to standard output or a file.
  • write [-uvm] <id> [host file] <container file>
    Writes from standard input or a host file to a file in the container.
  • kill <id>
    Terminates a running container.
  • share [-uvm] [-readonly] [-asuser] [-port <portnumber>] <id> <host folder> <container folder>
    Shares a host folder into the container.
  • vhd [-uvm] <id> <host vhdx file> <container folder>
    Shares a virtual hard disk file into the container.
  • crash <id>
    Forces a crash of the virtual machine hosting the container (only works for containers hosted in a virtual machine).

I will give you some examples of how you can use hcsdiag.exe to interact with some of the Hyper-V containers. Now again, this focuses mostly on technologies like Windows Sandbox, Docker Hyper-V Containers, WSL 2, and similar features.

You can find more documentation on Hyper-V on Windows Server or Hyper-V on Windows 10 on Microsoft Docs.

List all containers and Hyper-V VMs

With the hcsdiag list command, you can create a list of containers and Hyper-V virtual machines running on the host. Including Windows Sandbox, Windows Subsystem for Linux 2, and Application Guard.

hcsdiag.exe list

hcsdiag.exe list

Connect Console to Hyper-V containers and Windows Sandbox

You can also directly connect to the console of containers or the Windows Sandbox. Remember that it only works for Hyper-V containers where the guest is not protected from the host. Not for containers like Hyper-V VMs, where the guest is also protected from the host. If you need to remote into want console access or run commands against a Hyper-V VM from the host, check out PowerShell Direct for Windows VMs and hvc.exe for Linux VMs.

hcsdiag console connect

hcsdiag console connect

Here is an example where I am connected to a Windows Sandbox container using hcsdiag.exe.

hcsdiag Windows Sandbox

hcsdiag Windows Sandbox

But that also works with Dockers container (Hyper-V containers) running Windows and Linux.

hcsdiag Linux Container

hcsdiag Linux Container

HCSDiag console provides you with an interactive connection to interact with the container.

Additional HCSDiag.exe features and commands

The HCSDiag.exe also provides you with a couple of additional commands you can use. For example, the read command to read a file from the container and output it to the host or as a file to the host.

hcsdiag read

hcsdiag read

You can use the “share” command to share a host folder into the container or use “vhd” to mount a virtual disk file (VHD) file to a container. The hcsdiag kill command terminates a running container.

Conclusion

HCSDiag.exe – Hyper-V Host Compute Service Diagnostics Tool is excellent if you need to troubleshoot these Hyper-V containers, virtual machines (VMs), Windows Sandbox, Windows Defender Application Guard, Windows Subsystem for Linux 2 and more. If you have any questions, feel free to leave a comment.



Windows Server webinar miniseries - Month of Cloud Essentials Speakers

Windows Server webinar miniseries – Month of Cloud Essentials

I want to let you know that in June I will be speaking in the Windows Server webinar miniseries focusing on how you can leverage the power of Azure together with Windows Server. Jeff Woolsey, Pierre Roman, Orin Thomas and I will be speaking about different scenarios using Windows Server in a Hybrid environment.

Join this four-part Windows Server webinar miniseries to learn tips and best practices for bringing the efficiencies and cost savings of Azure to your Windows Server workloads. Each 30-minute session includes demos and a live Q&A with Microsoft technical experts.

The Windows Server webinar miniseries – Month of Cloud Essentials sessions will focus on:

Intro to Windows Server Apps in the Cloud
June 4, 9:00 AM–9:30 AM Pacific Time by Jeff Woolsey 📅
Get an overview and explore resources to help you start running your Windows Server workloads on Azure.

How to Manage Windows Server Roles with Azure Services
June 11, 9:00 AM–9:30 AM Pacific Time by Orin Thomas 📅
Learn best practices to help improve security and scalability for apps by easily migrating Windows Server roles such as Active Directory, Windows File Server, and DNS to Azure.

Create Highly Available Apps with Azure VMs
June 18, 9:00 AM–9:30 AM Pacific Time by Pierre Roman 📅
Find out how to run business-critical Windows Server applications on Azure with consistent security, identity, and management features.

Modernize Windows Server Apps on Azure
June 25, 9:00 AM–9:30 AM Pacific Time by Thomas Maurer 📅
Explore hybrid cloud approaches for connecting your on-premises and multicloud environments to Azure with strategies that include containers.

I am looking forward to seeing you in the Windows Server webinar miniseries – Month of Cloud Essentials. If you miss any of the sessions, watch them on demand. You can register here.

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



Microsoft Learn TV

Check out Microsoft Learn TV Now!

Today at Microsoft Build 2020, Jeff Sandquist announced Microsoft Learn TV. Microsoft Learn TV is offering daily live, pre-recorded, and on-demand video programming for developers, IT Pros, and technologists within the Microsoft Learn platform. Microsoft Learn provides hundreds of free self-paced learning modules, and Learn TV expands on this to bring together live streams, shows, and instructional videos from Microsoft Cloud Advocates, Product Group leaders, and communities, making the Learn platform a one-stop-shop to learn and grow.

Watch Microsoft Learn TV 📺

You can watch it right here. 📺

Microsoft Learn TV Logo

It is will build on on-demand content from Microsoft Channel 9 and other popular video series as well live shows and content from first-party events and hackathons, with casual developer conversations and instructor-led sessions from advocates and engineers. 

Learn TV extends the existing Microsoft Learn platform with a 24/7 program, and with content for IT Pros, cloud developers, or business analysts, you’ll find things in the schedule for you.

I am personally looking forward to many great shows and videos. It will be the place to find the latest digital content so you can always keep updated on the latest announcements, features, and products from Microsoft. You might spot episodes from Azure Friday or Azure Unblogged and more.

Additional Tips and Resources

I also recommend that you open a free Azure account if you don’t have one yet. You can create your free Azure account here. Also, check out my blog posts about Microsoft Azure Certification:

I hope you enjoy watching Microsoft Learn TV. If you have any questions or comments, feel free to leave a comment on this post, or message me on Twitter.



Livestream Hybrid Cloud Server Management with Azure Arc

Livestream on Hybrid Cloud Server Management with Azure Arc

On Wednesday, May 27, I plan to do a Livestream on how to govern and manage servers in a hybrid cloud environment with Azure Arc. In the live stream, we will set up my Azure environment and add on-premises Windows and Linux servers to Azure Arc, so I can start managing them using the Azure Resource Manager.

Azure Arc allows you to onboard physical and virtual servers in your hybrid environment (on-premises, edge, and multi-cloud). By joining serves to Azure Arc, you get the benefits you are used from native Azure resources, like tags, RBAC, and many more. In the preview, you can now use Azure Management services like Azure Log Analytics and Azure Policy to make sure your servers are compliant across your hybrid environment.

Livestream Azure Arc for Servers – Hybrid Cloud Server Management

YouTube Livestream will be starting on Wednesday, May 27 at 16:00 (CEST): Make sure you set a reminder!

 ▶ Download the calendar ICS file here. 📅✔

You can also subscribe to my YouTube channel to get a notification.

Manage and govern your hybrid servers using Azure Arc

Thomas Maurer shows you how you can manage and govern your Windows and Linux machines hosted outside of Azure on your corporate network or other cloud providers, similar to how you manage native Azure virtual machines. When a hybrid machine is connected to Azure, it becomes a connected machine and is treated as a resource in Azure. Azure Arc provides you with the familiar cloud-native Azure management experience, like RBAC, Tags, Azure Policy, Log Analytics, and more.

If you are interested in these topics, join me and check out the following links:

Join us on the YouTube Livestream

If you are interested, join us on May 27 online. I am really looking forward to chatting with you in the Livestream about hybrid cloud server management with Azure Arc. You can find the live stream here on YouTube.

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