Time
7 hours 46 minutes
Difficulty
Intermediate
CEU/CPE
8

Video Transcription

00:01
Hello and welcome back to Cy Berries. Microsoft Azure Administrator A Z 103 course. I'm your instructor, Will Carlson. And this is Episode four as your command line tools.
00:12
So in today's video, we're gonna talk about the options that you have here within Azure for command line tools. And there are two of those two and 1/2. I would say we're gonna go ahead and set up the cloud shell within the azure portal so that we can do scripting within the portal without having to necessarily do any client site installs for this course.
00:32
And then we're going to spend a little bit of time talking about scripting and how that's gonna show up on the A Z 103 exam.
00:39
We're gonna get started today with a couple of slides, and
00:43
I want to call out again that there are two options for command lines in the azure ecosystem and the 1st 1 is gonna be the azure cli. This is gonna be based on the bash command line tool. So if you're familiar with Lennox or you come from that side of the fence,
01:00
this is gonna be the tool. It's most familiar to you.
01:04
There's also power show, which is clearly a Microsoft product has been involved in included in windows for quite some time now. And there are some. There is some work being done recently that makes power shell a cross platform products as well.
01:19
The Azure or ese cli has already cross platform. So ultimately, both of these tools were work on Windows Lennox or Mac Os. So you can really choose which one you want to use. If you would like to use power shell on Lennox or in Mac OS,
01:38
just be sure to look for and download. As of right now,
01:41
how are Shell Corps from? Get up
01:45
now, the tool that we're gonna be using here for this course because its deployment is the simplest and the quickest is going to be cloud shell and cloud shell is simply a command line that's present within the azure portal.
01:59
And you have the option in that cloud shell thankfully, to be able to use as your CLI or power shell, whichever one you would choose.
02:07
And we're gonna stick to power shell in this course just for consistency sake. But I recommend that you follow along, as mentioned in the supplemental material episode with the commands in Azure cli. So again, if we're doing it with the gooey in portal,
02:23
you should ultimately know or be familiar with how to do it in Power Shell
02:28
and an azure CLI.
02:30
Now, if that's completely scared you off,
02:34
let's talk a little bit about how scripting is going to show up on a Z one of three now. First of all, a little bit of the bad news is that,
02:43
as you see Elias Fair Game in the exam, Power Shell is also fair game in the exam and some of you right now, maybe crying foul at Microsoft for having us be familiar with two scripting engines in a Z 123
03:00
I don't necessarily disagree with you. I applaud Microsoft for giving us choice in using the command line tool that we're most familiar with. But it is a little bit interesting that we have to be familiar for with the exam with both command line tools.
03:15
But like it or not, that's the way the exam is going to be Now. There are some helpful ways to survive scripting on the A Z one of three exam. So let's go through those and give ourselves a little bit of hope here. Right?
03:30
So in the azure sea, Ally, the pattern four commands is going to be
03:37
the letters ese
03:38
plus a noun or the object that you're going to be interacting with, and then the verb meaning what you're gonna be doing on that object. So, for example, here
03:49
ese VM list calls the azure CLI command with a Z,
03:54
we're going to be interacting with a V M. And our command is to list them all a Z V m list. That's pretty simple, right?
04:04
And the command follows along for a number of
04:09
consistent verbs across across the gamut here. So list create and delete are going to be verbs that you see a lot regardless of the object that those air being done on and those should be pretty self evident as to what they do. But to further the example, we could do a Z group
04:28
list and
04:30
now we're listing resource groups.
04:32
We can do this command to create a new group and this command to delete a group. Now, obviously there are going to be switches or other options put in these commands to make them operate because just a Z group create wouldn't give the command line any information about the group that you wanted to create. But
04:51
this is the gist of the commands for ese cli
04:56
a Z plus the object plus what you want to do with it
05:00
now to counterpoint that with power shell,
05:02
the pattern is a little bit different.
05:05
Her power shell. It's going to be a verb Plus now. So to do the examples for the A C C ally over here on the power shell side, it's gonna be get a Z V M.
05:17
Now, one thing I'm gonna call your attention to as you're looking for documentation online, you will see as your R m. So instead of get a C v m, you would see get azure R M B M and
05:33
Azure R M is the older version of the power shell module for azure.
05:41
You'll see it more heavily, and documentation you most likely at this point will not be installing. The azure are in module. It's not the current module you'd liketo installed the azure tools for power shell. Make sure to install the ese module.
05:57
But having said that, the current command for listing all of the virtual machines in my past your account for power shell would be get a ZPM.
06:08
New creates a new one. Remove removes of'em. Same thing here for groups yet Resource Group New Resource Group Remove Resource Group
06:19
so you can see the terminology is a little bit different. It's very consistent for virtual machines, but it's different between groups and resource groups here in power ***.
06:30
Now, if you would like to install the azure CLI on your own machine, interact with that. As a client installed, you can download the M S I installer for the azure CLI. It's really simple. Just Google it. It will be towards the top of the list.
06:44
You can also find documentation on how to download and install the ese module for power show. We're going to take a different approach here for this course again because it's very simple and straightforward. We're going to use the Cloud show
06:59
now to get cloud show all set up. We're going to log in to our azure portal at portal dot azure dot com, and we're going to click this somewhat nondescript button up here at the top.
07:09
This is the cloud shell button.
07:11
Now, because this is the first time that we've set up a cloud shell, we're going to be prompted to create a storage account. And this is gonna be for saving any scripts that you would like to save or any files that you want to write to disco output that you would like to write to disk. Obviously,
07:28
it has to have somewhere to be written to.
07:30
And as you're writing commands, you go that all has to have somewhere to live. That's gonna need a storage account so you can select the subscription that you want to put that storage account in, and you just click create storage
07:43
and you can see that cloud shell. That storage account for cloud chill is being has been created. And now cloud shell is initializing
07:51
and once your cloud shell is all initialize, you're ready to go. This should be very familiar. We're looking at a command line right here in portal. Now, just for the sake of illustration weaken do ese bm list.
08:05
And that's gonna show us all the V EMS currently in our azure tenant
08:09
now, Something to be mindful of is you've opted for the client side install of ese cli or the ese power shall modules is you're gonna have to connect your
08:20
command line Tool in tow. Azure. You're gonna have to log in. So
08:24
be prepared for that. Depending on the tool that you're using will depend on how that process works. But I call your attention to that more to point out the fact that because we're using the cloud shell tool, I do not have to log in. Obviously, we're already logged in here.
08:41
Another thing that's interesting about Cloud Shell, in addition to its ease of setup, is I can simply click over here.
08:48
And it did confirm
08:50
to Power Shell. I don't have to install both tools, but I can use whatever tool I want right here in Portal.
08:58
This is gonna be important, I believe, as you're going through in preparing for the easy one of three exam again because I highly recommend you keep up with the commands both in Power shell and in ese cli.
09:11
And again just to prove the point here, I can go ahead and type get a Z B M and Power Shell, and it has listed all of the virtual machines in this tenant.
09:22
And that's all there is to using command line tools here within portal.
09:28
So in today's video, we talked about the two command line tools available for Azure, both ese or azure CLI and power shell. Using the ese module as the current module
09:39
we talked about. We talked about a little bit about how you can install those tools on your own machine. Be an azure sea ally or power shell. There's documentation on line to walk you through How to do that? That is very good,
09:50
but I recommend you use Power shell for this course. It really is quite simple, and you can switch between both tools right within portal.
09:58
Yes, unfortunately, like it or not, we do have to be familiar with both. Scripting language is for a Z 103
10:07
where there are some patterns that we can follow that simplifies our live here as well. The other thing that I'll call out to you before we move on and close for today in this episode is that you will not be creating command line commands from scratch on the A Z 103 exam.
10:24
Most likely, what you're going to see on the exam is a fully fleshed out command with two or three things that are missing. And what you're gonna have to do with those blanks essentially is fill them in either from a a dragon drop sort of question. Or
10:43
each of those blanks will have a drop down with multiple choice.
10:46
The devil in the details here is that there's three blanks to fill in, and if you get all of them right, but one, you still don't get any points for that question. So you will not know how to create commands from scratch. But you should be familiar enough with the commands to know what goes where. If you have the bulk of the command written for you
11:07
coming up next, we're going to actually get our hands in an example of scripting in cloud shell so that you can become a little more familiar with the command line switches and the way to command work and variable assignments in scripting tools for azure.
11:26
Thank you so much for joining me today, and I'm looking forward to the next episode

Up Next

AZ-103 Microsoft Azure Administrator

This is a training course for the Microsoft Azure AZ-103 Certification. The Microsoft Azure Administrator training course teaches students to perform tasks like managing Azure subscriptions and resources, implementing and managing storage, deploying and managing virtual machines (VM) and networks, and managing identities!

Instructed By

Instructor Profile Image
Will Carlson
Director of IT and Cybersecurity
Senior Instructor