How to execute password rotation for non-admin users of a VM using Azure Key Vault and Azure Automation Account?

Syed Harith Zaki 25 Reputation points
2024-07-29T02:24:27.9666667+00:00

I want to set up automated password rotation for my VM using Azure Key Vault and Azure Automation Account. I have used this article: https://www.advatek.co.uk/blog/enhancing-security-with-azure-key-vault-automated-password-rotation as a guide to do this. However, I found that the script provided is only applicable to rotate the password for the local admin of the VM. In my case, I plan to rotate the passwords for the local admin along with other users of the VM. I was wondering if the 'Set-AzVMExtension' with the name 'VMAccessAgent' only works for local admin credentials. If it does, are there any alternative methods to change the password of other local users using PowerShell? Thank you.

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,199 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,198 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,337 questions
0 comments No comments
{count} votes