Posted in Azure VM, Development, Microsoft Azure, Windows Powershell

Microsoft Azure – How to check the available extensions for a virtual machine using Windows PowerShell

Hello friends,

Please find the link of my new article –

https://social.technet.microsoft.com/wiki/contents/articles/40102.microsoft-azure-how-to-check-the-available-extensions-for-a-virtual-machine-using-powershell.aspx

Advertisements
Posted in Azure VM, Development, Microsoft Azure, Windows Powershell

Microsoft Azure – How to create a virtual machine using PowerShell – Part 2

Hello friends, you can find the post at below link –

https://social.technet.microsoft.com/wiki/contents/articles/40010.how-to-create-a-virtual-machine-in-microsoft-azure-using-powershell-part-2.aspx

Posted in Development, Microsoft Azure, Windows Powershell

Connect to Microsoft Azure Subscription using Windows PowerShell – Part 1

Hello friends, in this blog we will learn how we can connect to Azure Subscription using PowerShell.

As you know we can also perform the operations from PowerShell window which we can do using management portal.

We can connect to the Azure subscription from windows PowerShell in 2 ways:

  • Importing license setting file
  • Adding Azure account

In this blog we will cover connecting to azure using license setting file. Connect to Azure using license setting file method takes 2-3 steps more than directly adding azure account method.

First step is to get the Azure Publish setting file from Microsoft website.

  1. Open the Windows PowerShell window. If you don’t have installed windows PowerShell then you can download from Microsoft download library, it’s easy.
  2. Type the command Get-AzurePublishSettingsFile. Press Enter key.

1

3. Microsoft site gets opened and asked you credentials to download the setting for that account. A file gets downloaded to your local system with extension of publishsettings.

E.g. Pay-As-You-Go-8-1-2017-credentials.publishsettings

2

4. Once we download that file, we need to import that setting file which contains information about your azure subscription.

5. Type the command Import –AzurePublishSettingsFile ‘location of publish setting file’

3

Now we have imported the settings from that file and we are connected to our Azure subscription now.

6. Let’s check the details about our Azure Subscription

Get-AzureSubscription

4

It tells about the details of azure subscription like subscription id, subscription name,default account, etc.

7. Subscription details we get are same and we can check these from Azure management portal.

5

8. Similary we can also check the details about the virtual machines we have in our subscription.

Type the command –

Get-AzureVM

Typing above command did not returned any information as we are connected using Resource manager mode.

Get-AzureRMVM

See it list out all the virtual machines associated to current azure subscription.

6

So, this is the first method that we learnt today using importing license setting file to connect to our azure subscription from Windows PowerShell.