From 299efee6e9c2226fe780b91635c6a4f11c6e0a6e Mon Sep 17 00:00:00 2001 From: Jiri Formacek Date: Wed, 21 Feb 2024 17:25:57 +0100 Subject: [PATCH] fix: account location and logging --- Module/AutomationAccount/AutomationAccount.psm1 | 4 +++- vss-extension.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Module/AutomationAccount/AutomationAccount.psm1 b/Module/AutomationAccount/AutomationAccount.psm1 index 970eb19..0d45732 100644 --- a/Module/AutomationAccount/AutomationAccount.psm1 +++ b/Module/AutomationAccount/AutomationAccount.psm1 @@ -87,6 +87,7 @@ function Connect-AutoAutomationAccount { throw "Subscription $Subscription no found" } + "Connected to subscription $Subscription" $script:AutomationAccountResourceId = "$($subscriptionObject.id)/resourceGroups/$ResourceGroup/providers/Microsoft.Automation/automationAccounts/$AutomationAccount" $headers = Get-AutoAccessToken -AsHashTable @@ -96,6 +97,7 @@ function Connect-AutoAutomationAccount -Headers $headers ` -ErrorAction Stop $script:accountLocation = $rslt.location + "Automation account validated; location: $($script:accountLocation)" } } @@ -536,7 +538,7 @@ Function Add-AutoRunbook process { try { - if($location = '') {$location = = $script:accountLocation} + if($location = '') {$location = $script:accountLocation} write-verbose "Modifying runbook on $runbookUri" $payload = @{ name = $Name diff --git a/vss-extension.json b/vss-extension.json index 58f66ce..f865108 100644 --- a/vss-extension.json +++ b/vss-extension.json @@ -2,7 +2,7 @@ "manifestVersion": 1, "id": "Manage-AutomationAccount", "name": "Manage-AutomationAccount", - "version": "1.9.36", + "version": "1.9.37", "publisher": "GreyCorbelSolutions", "targets": [ {