From the course: Azure Developer Associate (AZ-204) Cert Prep: Implementing VMs and Batch Jobs

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create a VM using PowerShell

Create a VM using PowerShell - Azure Tutorial

From the course: Azure Developer Associate (AZ-204) Cert Prep: Implementing VMs and Batch Jobs

Start my 1-month free trial

Create a VM using PowerShell

- [Instructor] Let's see how can we achieve the same result by using PowerShell. So, we are going to start inside a PowerShell ISE. As I mentioned earlier, we can run exactly the same thing inside Azure Cloud Shell, but I would prefer to run it from here because I want to show you how you can use different aspect. The first thing we need to do is to log into our Azure account. So, we do that by calling Login-AzAccount. I put here as a comment Login-AzureRmAccount, and the reason I put that is because Microsoft changed the names of the prefix, so before it was AzureRm, and then they realized it is too long, so they went and said everything should now be called Az. So both AzureRmAccount and AzAccount would be valid names. Now, if you see either of them when you take the certification, both of them would be actually valid. Now, let's see how that runs. If I press this run selection, or F8, it will run only one line at at time, so I just want to run line-by-line so we get a chance to…

Contents