summary import { VirtualMachineExtensionUpdate , ComputeManagementClient } from "@msinternal/compute-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function updateVMExtension ( ) { const subscriptionId = "{subscription-id}" ; const resourceGroupName = "myResourceGroup" ; const vmName = "myVM" ; const vmExtensionName = "myVMExtension" ; const extensionParameters = { type : "extType" , autoUpgradeMinorVersion : true , publisher : "extPublisher" , settings : { UserName : "xyz@microsoft.com" } , suppressFailures : true , typeHandlerVersion : "1.2" } ; const credential = new DefaultAzureCredential ( ) ; const client = new ComputeManagementClient ( credential , subscriptionId ) ; const result = await client . virtualMachineExtensions . beginUpdateAndWait ( resourceGroupName , vmName , vmExtensionName , extensionParameters ) ; console . log ( result ) ; } updateVMExtension ( ) . catch ( console . error ) ;