From the course: Automation with Azure Powershell and ARM Templates

Install Azure cmdlets

- [Instructor] So to get started with Azure PowerShell, you need to install a couple of things on your machine. The first one is to set the execution policy high enough so that you can actually run these scripts and then you install the PowerShellGet, you need to have a version 1.1.2 or higher and then finally, install the AzureRM module. Now I have created in here, on my blog, I have a link to a script that you can download to set up Azure PowerShell. It will go out to bit.ly/azpowershell, that then downloads a script we can save and then we can say open with and then PowerShell, but I've already done this so I'm going to go over here into PowerShell. I'm running as an administrator and so the first thing is to set your execution policy. Now in PowerShell, you can run the entire script by clicking run or you can do an F8 and run whatever is selected or where the cursor is. This goes out, sets the execution policy, say yes to all, then you want to install the module PowerShellGet. You can check to see if you already have a version that's higher than 1.1.2.0 but just to be safe, go ahead and run this. Once it does that, it goes out and downloads some nougat packages that contain the different pieces that make the module work. Now we're going to install the AzureRM module, which is going to be the Azure commandlets for resource manager. All of the commandlets in Azure resource manager have the word AzureRM inside of them. That's one way to know if you've got the right version, but we'll go ahead and run this and again this takes a little bit of time because it's going to go out and it's going to go out and ask if you want to install it, we'll say yes and then it's going to download and it will install all of the different parts of that module so we can use it. After that gets done and it does take a little bit of time, you'll need to run the import module to add it, to load it whenever you run the PowerShell. Sometimes I've found that I need that, sometimes I haven't. That's all you need to do and when you are done, you can close out the administrator version of this and you're ready to roll and there we go.

Contents