Hi all,
I am creating a PowerShell runbook to run an Azure Data Factory (ADF) pipeline. For this, I have to make a connection first using the Connect-AzAccount
command (Az Module).
With the "old" Azure Rm Module, the following (command Get-AutomationPSCredential) works to retrieve the user name and password from the credential:
$myCred =
Get-AutomationPSCredential -Name
'MyCredential`
$userName = $myCred.UserName
$securePassword = $myCred.Password
$password = $myCred.GetNetworkCredential().Password
$myPsCred = New-Object System.Management.Automation.PSCredential ($userName,$password)
Connect-AzureRmAccount -Credential $myPsCred
I tried the
Get-AzAutomationCredential command, but this does not return the credential user name and password. Can anyone help me with this?
Thank you in advance!
Kind regards,
Ricardo