18 hours 58 minutes
Welcome back. This is the first episode in our last module. What we're going to talk about Azure Power Show and CLI
bye. Objectives include discussing as your power show as your seal lie the azure cloud shell and then taking a look at a demo of all these options.
So throughout this entire course, we've primarily been working in the azure portal to create and configure. Our resource is while this is great for when you're starting to learn azure, I would highly recommend also looking at a more programmatic way to manage your resource is we can do this through a couple of different options.
The 1st 1 is through azure power shell.
This allows the ability to manage your azure resource is using power shell commands. It is available as a model that you can download to your local system
and requires power shell 5.1 or higher on Windows
or power shells six or higher on all platforms. Remember starting with powershell version six. We have a cross platform option that could be stalled on other systems like Lennox or Max systems. So maybe you're coming from a more windows background and hopefully you've been using power shell in the past.
This is just extending. Managing
your azure resource is with power shell commands, and the module is probably similar to other ones you've used, maybe like active directory. Or you're connecting out to a remote service like office 3 65 like an exchange module, SharePoint or Skype for business.
In addition to power show, we have azure sea ally or command line interface. This allows the ability to manage. Azure Resource is using a more command like experience, maybe one that you used to from a Maur Lennox background where you use Bash.
This is also available as a download that you can install on your local system for multiple platforms.
Like I said, it's very similar to bash. So if you come from a more Lennox background and you're not familiar with power Shell, maybe the azure seal lie would be more comfortable for you to learn in managing. Your azure resource is, and that's what's great. You don't have to learn one or the other. If there's one, you're more familiar with me. For example, I come from a
Windows background and abused power show a lot,
so the azure power show module is perfect for me to manage. The resource is understand the cent tax, understand how to work with it.
But if you don't have that background and you use Maur command line interface, definitely check out the address. Eli. It'll probably make more sense to you and can help you get up and running with it faster
now. I mentioned the power shell and seal. I have modules that you can download install on your local system, but we do have another option. There is the azure cloud shell. This is a browser based command line option that is hosted inside of Azure, and you can access it pretty much from anywhere
when the nice things about it is, it does provide automatic authentication into the service
and just besides Seelye, our power show commands. There's lots of other tools available, and it supports other languages.
Some of those tools might be text editors, like a slimmed down version of visual studio code and other languages. It supports our know Js dot net and python
taking a look here at a screen shot as well. This is what the azure cloud shell looks like inside of the azure portal. You notice in the upper left, we have an option for Power Shell, but we can select that drop down menu and easily switch over to a bash shell. If we're going to use the CLI.
Now, let's jump over to our demo so we can see how to install and configure each of these options.
First, let's talk about the azure Power show module. If you're not familiar with the Power Show Gallery, this is a remote powershell repositories hosted by Microsoft
that has lots of power show code such as modules, scripts and DSC. Resource is,
there are Microsoft written modules available for download in here, but there are also other ones created by members of the community that can be uploaded and access through here as well.
So first, let's go ahead and search for power shell packages.
Let's like this top one of ese
And this is the module that contains our commandments that we want to use to manage. Resource is an azure,
and we can install this directly from a power shell window. Let me copy this command right here. I'm not gonna worry about getting the pre release version.
Let me switch over to my power show window.
So here, inside our window, I'm going to pace that Commander. Go ahead and press in Er.
Now, if you've never downloaded module from the Power Show Gallery, you're going to get this message saying the gallery you're connecting to to download this module is untrusted. Do you still want to download it now? You could just say yes right here. But if you're gonna get in the habit of downloading modules from here, maybe you want to go ahead and select this repositories as a trusted one.
So I'm going to cancel this for right now.
And if you run the get PS repositories command, you can see our PS gallery is currently set is untrusted
so we can run a set P s repositories, specify the name of our gallery
and change the installation policy to trusted.
Once that's complete,
let's rerun are installed. Module command
and this is going to start downloading are dependent packages that work with the ese module. Gonna pause the video. Let these finish downloading will come back and take a look at it when it's done
than insulation does take a few minutes to complete. So just be patient, Will it downloads all the modules.
But now that we're done, we can run, get module
search for anything, starting with a Z.
And since none are currently loaded,
we'll run list available.
So here, you see, we have a whole bunch of different modules that it downloaded.
We have a bunch of different modules here that correspond to different resource is like accounts are as your advisor, maybe network compute or container registries.
So each of these modules holds different commands to work with those different resource is,
and from our power show window here we can run connect ese account.
This will bring up a sign in window
where you can put in a user name and password,
and it's gonna sign us in to our subscription name that we have as well as our tenant, I D.
So, if from here we could run something like it ese resource group.
It's gonna list out our one resource group I have right now inside of our subscription
that does it for power show. Let's see how we can install the azure cli
out in the azure documentation. We have the option to install azure sea alive for Windows. But as you can see on the left, we have other options we could install it on, such as Mac OS or different Lennox versions.
Let's scroll down here and we'll just download the M s. I installer for Windows.
This is gonna open a pretty standard M s I installation wizard. Let's go ahead and accept our terms of agreement. It complete the install.
So I'm gonna pause the video, wait for this to finish installing them. We'll come back when it's complete.
All right. Our installation is now complete.
If we go back to our power show window, we can now use our seal like a man's inside our power show window. We could also use the inside of the regular windows Command Prompt.
So from here, if we want to log in to our azure tenant,
we can run the ese log in command.
And what it will do is launch a browser window that we can use to log into our remote session.
And once we get signed in, we can see all the subscriptions that we have access to.
Then we can run command to look at our resource groups, and you can see the syntax as much simpler than power show, especially if you're more used to a bash like shell or a command line
that does it for getting some of our modules installed onto our local system for either power shell or seal lie. But let's come back to our azure portal and take a look at the clouds shell
here on the home screen in the upper right. We can click this icon here
to open our cloud show.
If you've never launched the cloud shell before, it actually uses a nash your storage account in order to store our shell image that it will load each time.
We also have an azure file share where we can store files and use them across our different command line options. This is also useful. If you log in from a different machine, you still have access to your files that are stored out. Nasher.
If you selected create stored here, it would automatically create all the back end infrastructure for you with automatically created names.
What I'm gonna do is show advanced settings
so you can see exactly what we're going to configure.
You can select your cloud shell region
your resource group. I'm gonna create a new one,
the name of your storage account
and the name of your foul share.
Let's go ahead and create our storage
and you can see it's now completed and open up into our best shell.
But as we saw on our screen shots, we can select this menu
and switch over to power show.
And so, from here we can continue to run our commands
just like we did with our local modules.
Now this window right here is a little small, and you can maximize it to take up the entire screen. But you can also open it in its own tab.
By navigating to shell that azure dot com,
you'll select your default directory that you want to work with
here inside the Azure Cloud show. We do have a couple options. We can restart it in case it gets hung up, or we need to clear something out.
We have a couple of setting options, such as the text size or fun we'd like to use.
We can upload or download files into our azure file share.
We get it simply opened. A new session,
opened a text editor
or take a look at a Web preview.
Let's go back to our azure portal.
Let's go into resource groups.
You can see our resource group we just created for our cloud shell.
We have our cloud shell storage account.
Then we can go into our foul shares.
And here we have our cloud show file share
where we have our cloud console directory.
And inside that directory, we have a copy of the image that's loaded in Tark Azure Cloud Show every time we load it.
So you might be wondering,
Do I have to pay for the storage with this cloud show? And yes, you do. But it is gonna be very, very minimal.
But if you want, you could simply delete the storage account whenever you're not using it. Or if you don't anticipate using your cloud show for a long time,
that does it for a demo on how to get started with the azure power show and see Ally, let's jump back to the slides and wrap this up
kind of next. We're going to take a look at some resource is on how you can prepare for the exam. If you've never taken a Microsoft exam, See you in the next episode.