Forum Discussion
kbcit
Oct 27, 2017Copper Contributor
automation account add connection
hey , i am new to azure, i am facing a automation issue, i have success create a runbook and when i run it, it got error, the told me: Get-AutomationConnection : Connections asset not found. To cre...
Felix Bodmer
Oct 27, 2017Copper Contributor
I guess the problem might be that you need to distinguish between login to Azure and remoting to your server. I use below to login to Azure:
$SubscriptionName = Get-AutomationVariable -Name 'VAR-AUTO-SubscriptionName'
$AzureAutomationCredential = Get-AutomationPSCredential -Name 'CRE-AUTO-AutomationUser'
$AzureAccount = Add-AzureRmAccount -Credential $AzureAutomationCredential -SubscriptionName $SubscriptionName
I'm not using Azure Connection Assets but retrieve credentials from Azure Credential Assets and then perform the remoting using that credential - same as you did.