Unable to access resource group in Azure portal

Xiangyi Wu 1 Reputation point
2020-04-15T08:21:02.897+00:00

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://learn.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 Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,035 questions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 20,777 Reputation points Microsoft Employee Moderator
    2020-04-15T23:21:33.873+00:00

    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. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2020-05-12T04:31:00.217+00:00

    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

    0 comments No comments

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.