Microsoft Azure – Install Guest Configuration Extension for Windows
Pre-requisite:- Azure
Azure is Microsoft’s cloud computing platform which helps to build solutions to meet business goals. It supports infrastructure (IaaS), platform (PaaS), and software-as-a-service (SaaS) computing services.
Here in this article, we will show how to install guest configuration agents on windows virtual machines in Azure using Powershell commands in simple easy steps. To implement this activity one should require Contributor or Virtual Machine Administrator roles on the target azure resource. Let’s get started.
Implementation
Step 1: Log in to Azure Portal.
Step 2: Access the Azure Cloud Shell and Switch to PowerShell Terminal.
Step 3: Now Create a new file using touch installGuestAgent.ps1.
touch installGuestAgent.ps1
Step 4: use code to write the code and paste the mentioned command into the file.
code installGuestAgent.ps1
Note: Now in the code add the VM Name, Resource Group, and VM Location values of choice that you wish to install.
Set-AzVMExtension -Publisher
'Microsoft.GuestConfiguration'
-Type 'ConfigurationforWindows' `
-Name 'AzurePolicyforWindows'
-TypeHandlerVersion 1.0
-ResourceGroupName 'add rgroup ' `
-Location ' add location '
-VMName ' add vm '
-EnableAutomaticUpgrade $true
Step 5: Save the file and run the code. Use the following command to run the code.
./installGuestAgent.ps1
Step 6: Go to the target VM and check the VM Extensions + applications.
You should see this “AzurePolicyforWindows” extension on VM if successful.
This is how you can install a guest configuration extension for Windows VM.
Last Updated :
31 Mar, 2023
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...