Development · Microsoft Azure · Windows Powershell

Microsoft Azure – How to Check the availability of cloud services using PowerShell

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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s