Azure Update Manager Migration script error: Cannot bind argument to parameter 'ResourceId' because it is an empty string.

Rasmus Just Tobiasen 0 Reputation points
2024-07-30T07:26:25.05+00:00

Hey guys,

Currently scratching my head as to why I can't proceed here. I'm trying to migrate from Automation Update to Azure Update Manager. So far I've had success with one of the Automation Accounts, but second account fails?

I have made sure I have the correct access for the Automation Account. Any ideas as to why it's complaining? The only difference between the one that worked, and the one that doesn't, is that they're location is different.

https://learn.microsoft.com/en-us/azure/update-manager/guidance-migration-automation-update-management-azure-update-manager?tabs=update-mgmt

I'm currently using the MigrationPrerequisiteScript, but when I enter the ResourceID I grab from properties in the Automation Account. It comes back with this error.

I just copy the script, and then paste into ps. Then enter information that is needed.

I have removed the account and subscription id from the output.

VERBOSE: Successfully connected with account (ACCOUNT) to subscription (SUBSCRIPTION ID)
VERBOSE: [Debug]Invoke-AzRestMethod started with params
[@{Path=(SUBSCRIPTION ID COPIED FROM PROPERTIES)/linkedWorkspace?api-version=2022-08-08; Method=GET}]. Retry: 1.3
VERBOSE: [Debug]Invoke-AzRestMethod with params
[@{Path=(SUBSCRIPTION ID COPIED FROM PROPERTIES)/linkedWorkspace?api-version=2022-08-08; Method=GET}] succeeded. Output:
[@{StatusCode=200; Content={
  "id": null
}; Headers=System.Object[]; Method=GET;
RequestUri=https://management.azure.com/subscriptions/(SUBSCRIPTION ID COPIED FROM PROPERTIES)/linkedWorkspace?api-version=2022-08-08;
Version=1.1}].

Write-Telemetry : Unhandled exception Cannot bind argument to parameter 'ResourceId' because it is an empty string..
At line:594 char:9
+         Write-Telemetry -Message ("Unhandled exception {0}." -f, $_.E ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Telemetry

Write-Telemetry : Unhandled Exception Cannot bind argument to parameter 'ResourceId' because it is an empty string..
At line:1252 char:5
+     Write-Telemetry -Message ("Unhandled Exception {0}." -f $_.Except ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Telemetry
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,256 questions
Azure Update Manager
Azure Update Manager
An Azure service to centrally manages updates and compliance at scale.
314 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Denis 5 Reputation points
    2024-07-31T08:16:27.93+00:00

    Same problem here, do you find a solution to fix it?

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.