The Azure Virtual Machine Agent is an important process that manages the interaction that Azure Fabric Controller has with the virtual machine. This includes administrative tasks, software installation, executing extensions, and more. Microsoft recommends having the agent installed on all virtual machines. For more information, see the Azure documentation.
References:
https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-windows
Once a Virtual Machine is created in the console, the choice to install the Windows agent cannot be changed. The agent is installed by default, however, so if you have chosen not to install it then simply create a new virtual machine without disabling it.
In Terraform -
Deprecated in favor of azurerm_linux_virtual_machine and azurerm_windows_virtual_machine:
References:
https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-windows#install-the-vm-agent
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_machine#provision_vm_agent