Hello friends, in this blog we will learn how to check whether a cloud service is available to use with virtual machine or not. Cloud service is basically how to access virtual machine using virtual IP address (VIP).
Cloud services can contain multiple virtual machine by creating cloud service first and then associate that public VIP to multiple virtual machine.
When we create cloud service using management portal it tells us that whether this cloud service is available or not. But when we do this using PowerShell we will not get such facility and we need to test it manually using some cmdlets to check whether this cloud service is available or not.
So, lets login to our azure account from PowerShell and check the current VM that we already have in our azure subscription.
Now, write the command to test whether cloud service “kkvm015093” is available or not.
Test-AzureName –Service “kkvm015093”
In the result it returns True which means this service is already taken or present.
But you can still create the virtual machine using this cloud service as we know that multiple VM can use the same cloud service.
If we write any service name that is not present it will return False.
To get the more information about an existing cloud service we will write command –
Get-AzureService –ServiceName “kkvm015093”
If you try to get the information of cloud service which had returned False it will throw an error, saying ‘The hosted service does not exist’.
So, we today we have learnt that how to check the cloud service availability using PowerShell.