PowerAddict.net

powerAddict.NET

by Lou Goban
IT Application Professional at Syntax

How to get/read password in Azure Automation Accounts

Let’s say for some reason you don’t know the password for automation account, which is saved in your Azure tenant > Automation Account > Credentials.

This code will help you to get/read that password:

$cred = Get-AutomationPSCredential -Name <Name of your credentials>
$cred.GetNetworkCredential().UserName
$cred.GetNetworkCredential().Password

That’s it.

You can create new runbook with this code and run it.

Leave the first comment