Azure/azure-support-scripts

Pulling the wrong subscription ID when we have multiple subscriptions to script

Opened this issue · 0 comments

[Error] Problem VM UbuntuServer not found in resource group TESTRG in subscription xxxxx-xxxx-xxxxxx-WRONGSUBID. Verify the vmName, resourceGroupName, and subscriptionId and run the script again.

In short, everytime I try to run the command ps script {New-AzureRMRescueVM.ps1} for repair vm as this article says, the scripts goes after wrong subscription ID.
I have set the **

az account set --subscription --------CorrectSubID

**
but, it comes back saying that the VM is not found in this RG in this subscription (WrongsubID).

here, take a look at the attached screen shot after setting the correct sub and running the script again, please help.

WrongSUbID