Yovav
Yovav

Reputation: 2777

How to reserve a static IP for Azure Virtual Machines?

Amazon have Elastic IP that you can assign to an instance,

How can I do that with Azure for existing VM?

(I don't want to change all my DNS entries if the IP changes)

I found some articles about running power shell commands 1. http://michaelwasham.com/windows-azure-powershell-reference-guide/using-reserved-ip-addresses-with-microsoft-azure-virtual-machines/ 2. http://azure.microsoft.com/blog/2014/05/14/reserved-ip-addresses/ 3. http://azure.microsoft.com/blog/2014/04/22/static-internal-ip-address-for-virtual-machines/

But the commands are not recognized on my server (Windows server 2012 R2)

Any idea how can I do that?

This is the error that I'm getting on Power Shell:

PS C:\> New-AzureReservedIP – ReservedIPName "137.117.11.18" –Label "people-dns-ip" –Location "US West"
New-AzureReservedIP : The term 'New-AzureReservedIP' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ New-AzureReservedIP – ReservedIPName "137.117.11.18" –Label "people-dns-ip" –Loc ...
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (New-AzureReservedIP:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Upvotes: 3

Views: 1063

Answers (1)

opHASnoNAME
opHASnoNAME

Reputation: 20726

Sounds like you are missing the requiered CMD for PowerShell. Please download the Microsoft Webinstaller:

Download Microsoft Web-Installer

and do an fresh installation of Microsoft PowerShell. After this you should be able to use the "New-AzureReservedIP" command. Maybe you are running an old version of PowerShell without this CMDlet.

enter image description here

For more information about installation PowerShell, see: Configure and Install PowerShell (Azure)

Upvotes: 4

Related Questions