Tuesday, April 23, 2024

Azure Windows VM Agent Overview

 

The Microsoft Azure Windows VM Agent is a secure, lightweight process that manages virtual machine (VM) interaction with the Azure fabric controller. The Azure Windows VM Agent has a primary role in enabling and executing Azure virtual machine extensions. VM extensions enable post-deployment configuration of VMs, such as installing and configuring software. VM extensions also enable recovery features such as resetting the administrative password of a VM. Without the Azure Windows VM Agent, you can't run VM extensions.

https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-windows

Tuesday, February 20, 2024

Az.Accounts module causes error in VSCode

 

When attempting to make an Azure connection the following error occurs:

Connect-AzAccount : Method 'get_SerializationSettings' in type 'Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient' from assembly 'Microsoft.Azure.PowerShell.Clients.Reso

urceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.

At line:1 char:1

+ Connect-AzAccount

+ ~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Connect-AzAccount], TypeLoadException

    + FullyQualifiedErrorId : System.TypeLoadException,Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand


This is discussed in https://github.com/Azure/azure-powershell/issues/21960

The solution is to close VSCode and install a previous version 2.12.2 using

Install-Module -Name Az.Accounts -RequiredVersion 2.12.2

Then remove the faulty version 2.15.1 in this case

Uninstall-Module -Name "Az.Accounts" -RequiredVersion 2.15.1

Connect-AzAccount then correctly prompts for credentials


While you are now able to us Connect-AzAccount in VSCode in may not be much use because it may be in compatible with other modules such as Az.DesktopVirtualistation.

You may be forced to run up to date compatible modules entirely from ISE.