Azure PowerShell not finding my VM

1

I was trying to increase the size of the OS-disk on my Azure VM (Windows Server). I was following this MS doc:

MS docs Expand OS Drive

I can connect to my Subscription, but it can't seem to find my VM ('jsvm1') under the Resource Group (also named 'jsvm1').

I have attached a screenshot that shows (I think) I am using the correct names and syntax, etc.

Any ideas why this would be happening?... Jon enter image description here

user1691949

Posted 2019-01-30T19:27:41.740

Reputation: 11

Answers

1

Try the following code, I test it, and it works.

Login-AzureRmAccount

Set-AzureRmContext -Subscription "YOUR SUBSCRIPTION ID"

Get-AzureRmVM -ResourceGroupName YOURRGNAME -Name YOURVMNAME

Giorgos

Posted 2019-01-30T19:27:41.740

Reputation: 36

0

First, thanks Giorgos for you reply. I appreciate you trying to help.

However, it turns out that since I was using a "classic" VM, the problem was that I was using the ARM version of PowerShell commands, which will not work.

I tried installing the old Azure Module, but still had issues.

So... my best option was to "migrate" my VM to use ARM. This was reasonable, since I only had 1 small VM running, which I use for some small Web services. After that, I was able to increase the size of the OS disk in the Portal... BUT, of course, then I had to "extend" the disk to take advantage of the increased size.

Now my OS-disk is 60Gb instead of 30, and all seems OK. The migration went smoothly.

user1691949

Posted 2019-01-30T19:27:41.740

Reputation: 11

0

First, I'm sorry for the late answer. You can keep the following instructions if you face a similar problem in the future.

Remove Module Find instructions in this link.

Install Module Follow this document to do this.

Giorgos

Posted 2019-01-30T19:27:41.740

Reputation: 36