question

XiangyiWu-3592 avatar image
0 Votes"
XiangyiWu-3592 asked ManuPhilip answered

Unable to access resource group in Azure portal

Hello,

I am assigned as owner of a windows virtual machine and a resource group which this VM belong to, under my colleagues's subscription.
No issue with operating the virtual machine, however when I need to encrypt the VM in https, following this tutorial:
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/encrypt-disks
Running command: Get-AzVM -ResourceGroupName, it returns error as below. Using az group exists -n Resourcegroupname, it returns true though. How can I get access this resource group and finish the encryption? Thanks in advance for your help!
7369-capture.png


azure-active-directoryazure-virtual-machines
capture.png (19.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

karishmatiwari-msft avatar image
0 Votes"
karishmatiwari-msft answered KarishmaTiwari commented

If you have multiple subscriptions, set your subscription first and then try running the command.

To list all subscriptions : az account list --o table

To set your subscription : az account set --subscription <subscription-id>

Also ensure that all resources (including the Key Vault, Storage account, and VM) are in the same Azure region and subscription.









· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Karish!

I have switched the subscription id, but the same issue still exists when I ran this command
Get-AzVM -ResourceGroupName $resourceGroup -Name "VM"...

0 Votes 0 ·

Can you also confirm that all resources (including the Key Vault, Storage account, and VM) are in the same Azure region and subscription.

0 Votes 0 ·
ManuPhilip avatar image
0 Votes"
ManuPhilip answered

Hello,
Please check if the resource group you are looking for is existing in the subscription. Use the following command

 Get-AzResourceGroup

Next check is, verify the Power Shell version you use. Make sure that you are using x86 version of PowerShell

Regards,
Manu

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.