How to Uninstall Change Tracking Extension from 500 Azure Virtual Machines Efficiently?

Sujit Pochampalli 0 Reputation points
2025-01-19T08:34:48.2+00:00

I have 500 Virtual Machines running in my Azure portal, and I’ve installed the Change Tracking extension on all of them. I need to uninstall this extension from all the VMs, but doing it manually is time-consuming. Could you suggest a more efficient way to remove the extension from all VMs simultaneously? Your guidance would be greatly appreciated. I have installed using the below MS article:

https://learn.microsoft.com/en-us/azure/automation/change-tracking/manage-change-tracking-monitoring-agent?tabs=windows%2Csa-mi

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,419 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,258 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,056 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,291 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,745 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 116.2K Reputation points MVP
    2025-01-19T08:52:09.25+00:00

    Hi @Sujit Pochampalli ,

    uninstalling/removing an Azure VM extension for 500 VMs should be possible using PowerShell.

    1. Get all VMs (Get-AzVM)
    2. For each VM run Remove-AzVMExtension

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.