Tagging Azure Arc Connected Machines

Let's say that someone rolled out Azure Arc for server agents, but they forgot to tag these resources. So if you aren't tagging your resources today, I encourage you to do that.
I posted a simple code example on my Github about tagging Azure Arc resources. In this script, I'm using two different PowerShell modules:
- Az
- Az.ConnectedMachine
If you have both of these modules, you can query your Azure Arc-connected servers and tag them using the New-AzTag cmdlet.

Get the script from here - AzureArc/Set-AzureArcConnectedMachineTags.ps1 at main · Kaidja/AzureArc (github.com)
Member discussion