Open Powershell and select the active subscription:
select-azuresubscription MYSUBSCRIPTIONNAME
Then obtain the free IP address:
Test-AzureStaticVNetIP -VNetName MYNEETWORK
cmdlet Test-AzureStaticVNetIP at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
IPAddress: 192.168.0.4 (this address can be obtained in portal – see picture below)
VERBOSE: 7:46:51 PM - Begin Operation: Test-AzureStaticVNetIP
VERBOSE: 7:46:55 PM - Completed Operation: Test-AzureStaticVNetIP
IsAvailable : False
AvailableAddresses : {192.168.0.5, 192.168.0.6}
OperationDescription : Test-AzureStaticVNetIP
OperationId : bdde3332-01cd-a4d0-a8c5-d4a325fdd7d2
OperationStatus : Succeeded
Following images show Network Configuration which holds the subnet segment attached to the VM.
As next we chose one of free addresses from blue marked pool (see above)
Get-AzureVM -ServiceName SERVICENAME -Name MACHINENAME | Set-AzureStaticVNetIP -IPAddress 192.168.0.5 | Update-AzureVM
VERBOSE: 7:50:33 PM - Completed Operation: Get Deployment
VERBOSE: 7:50:36 PM - Completed Operation: Get Deployment
VERBOSE: 7:50:36 PM - Begin Operation: Update-AzureVM
VERBOSE: 7:51:08 PM - Completed Operation: Update-AzureVM
OperationDescription OperationId OperationStatus
-------------------- ----------- ---------------
Update-AzureVM ba8f5132-9767-a0a1-9633-0d1353ea2858 Succeeded
Posted
May 27 2014, 07:33 AM
by
Damir Dobric