<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=2012313439098820&amp;ev=PageView&amp;noscript=1">
Posted by Dana Epp

AZ Interactive : Azure CLI for dummies

Not yet a guru with the Azure CLI? In our most recent episode of #KnowOps, check out the wonders of az Interactive. It’s the same powerful CLI as normal, but with some very convenient features like suggestions, auto-complete, example commands and more.

Check it out below.


Video Transcript

If there only was an Azure CLI For Dummies...

Dana Epp here. Welcome to the channel dedicated for aspiring Azure administrators like you and me that are trying to know Ops and well, master the Microsoft cloud. Thanks for being here.

Ya know, I look at these books, the For Dummies series and I sometimes wonder if it dumbs down or it almost insults us when we read this. Who wants to hear Azure CLI For Dummies? But the reality is there's actually a really interesting mode for Azure CLI that makes it much easier so if you are really new and you want to have that experience that's really simplified, we've got you covered in the Azure CLI. Check out az interactive.

Alright, let's jump into the az interactive mode. What you see here, unlike the normal Azure CLI where you need to know all the parameters, az interactive will help you and educate you throughout the experience that you use. So if you take a look down on the bottom here, you'll watch as I start typing things, it will give me suggestions and give you opportunities to learn all the nooks and crannies and the individual parameters that are available.

So as an example here, I wanna just start by changing my account. So you'll notice this immediately once I started typing account, it's telling me can manage Azure subscription information. But if I don't know the commands I need, so in my case here, I wanna change so I'm gonna set. You'll notice the dropdown's giving me the option of what is available as parameters here. And as I go, you can see hey, you know what? It is a required parameter to have the subscription so I select that.

And if I don't know the name or my subscription ID, no problem. They'll automatically go and figure it out for you. So in my case here, I wanna jump over to my Visual Studio Enterprise demo account. And there we go. I'm now in my subscription. I can do the same thing with pretty much any command. And if I wasn't sure, I could just use letters like I could hit the letter G and it'll show me everything that starts with a G. In this case here, graph and group. Maybe I wanna list the groups that are here. And you'll notice that in light gray, it's actually showing you what a sample example could be. In this case, list minus-o table. But it also shows you a dropdown of all the different commands I could run. So maybe I will do the list minus-o. So it's helping to educate you as you're going through that. You'll also notice down on the bottom there's examples, so it'll actually show you.

If I wanted to look for anything in this group that's in the location of westus, there's the command right there. So it's helping to train you on how to use the individual commands. And it's as simple as that. So let's say I wanna do something more complicated like I wanted to create a virtual machine but I don't yet know what I wanna do there.

Well, we gotta start off by creating a group so I'm gonna actually do that right now. Wanna create this group and it's gonna show me everything that's required. So I need to have a name. I'm gonna call it KnowOps. And a location. Now I get a list of all the different locations I can put it in. Let's put it in canadiancentral today. And there it is. It's now created for me. So now that I've got that, I'm gonna go and create a VM in there so I type VM and now it gives me all my options. Well, in my case here, I wanna do a create and I'm gonna need to know the name of it. I'm gonna call it kopsVM. And I'm gonna need to know the group. That's a required field. That's in that KnowOps group. And I'm gonna want to have an image.

And you see down on the bottom here, there's lots of examples here like if I wanted just to do a Ubuntu image, it's right there. If I wanna have a certain Red Hat, if I wanna set the public IP, all this kinda stuff can be provided for you. And what's nice is as you're typing it in, it can help. Here's a list of all the different VMs that I have access to in this data set.

So here's this Ubuntu one. And now I need to know some other commands that might be needed. Here's all the other ones. Well, here's one that is an option. I need a username. And in my case, I want to also generate SSH keys and then I hit enter.

That's it.

Throughout that whole process, it's helping and educating me on all the different commands and everything that's there. It's simple as that. Go through it. Explore it. Try different things. What you'll find is that through this process, you'll be able to not only understand and find new commands. You can start seeing exactly what it is that is needed as optional and required parameters and there's lots of examples that are provided at the bottom to help you to understand what's going on.

Hey, it may not be Azure CLI For Dummies, but az interactive is an awesome tool to help you explore the Azure CLI and get help so you can see all the nooks and crannies on how it all works together.

I hope you found that useful. Let me know by hitting the like button so that I can tell that you're enjoying this content, and hey, smash the subscribe button so that every time I release a new video, you can be made aware of it. And more importantly, thanks for staying and watching. I really do appreciate that time. Leave me a comment if you have any other questions or maybe an idea of a future show that you'd like to see. Until then, we'll see ya in the next episode.


If there only was an Azure CLI For Dummies... #knowops @auditwolf




Topics: Cloud Operations (CloudOps), KnowOps