How do I reserve a static IP address for Azure Virtual Machines?

Amazon has Elastic IPs that you can assign to an instance,

How can I do this with Azure for an existing VM?

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

I found some articles about running 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 commands are not recognized on my server (Windows Server 2012 R2)

Any idea how I can do this?

This is the error I am getting from 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

      

+3


source to share


1 answer


It looks like you are missing the required CMD for PowerShell. Download Microsoft Webinstaller:

Download Microsoft Web-Installer

and perform a fresh install of Microsoft PowerShell. Then you can use the "New-AzureReservedIP" command. You may be using an older version of PowerShell without this CMDlet.



enter image description here

For more information on installing PowerShell, see Configure and install PowerShell (Azure)

+4


source







All Articles