>> Hey, friends. Everybody probably knows by now
that Cloud Shell is one of my favorite features in Azure.
PowerShell and Azure Cloud Shell
is now generally available,
but unlike the last time we talked about it on the show,
it now runs PowerShell Core on Linux.
Danny Martins is here to show us
what's new today on Azure Friday.
>> Hey, folks. I'm Scott Hanselman
and here's another episode of Azure Friday.
I'm here with Danny Martins,
talking about one of my favorite things,
Azure Cloud Shell.
Seriously, I love it.
>> Awesome.
>> shell.azure.com, and now you're making it better.
What's going on?
>> Yeah. So, since our public preview of
PowerShell and Cloud Shell,
we've switched over to PowerShell in Linux,
and so we're now running PowerShell Core 6.1 within Linux.
So I can jump right in here and do PS version table.
You can see that I'm running PowerShell Core 6.1.
We've also have done a lot of perf improvements,
and so if you're familiar,
Cloud Shell has a bunch of
containers running with an Azure.
Before, we just connect you to a container,
turn it on, do all that cold start.
Now we have a pool of running containers available,
and so the start-up time
is a lot more efficient and a lot quicker.
Also, with the switch to PowerShell Core on Linux,
we can now flip them back and forth between a bash
and PowerShell experience really smoothly,
and so I can type in bash right here
and I'm in bash from the
PowerShell experience within Cloud Shell.
>> Oh, you didn't have to open another shell and-
>> You don't have to open another shell.
You can still do the switch through the drop down,
and it's really fast now.
So that's what's new.
We've also got some additional commandlets available.
We've heard some feedback from our users that
there's a painful experience remoting into our Azure VMs,
having to go through all the NSGs,
find your IP addresses.
Yup, all that kind of stuff.
>> Yeah.
>> So we thought, "How can we make
this experience more simple?"
So I can go through,
navigate into a specific resource group
I'm working in today.
So if I go in into tab completion,
go into a specific resource group.
Oops. I can select my specific resource group.
>> So is this in your cloud drive?
>> Yeah. So this is not the cloud drive,
this is the Azure drive.
So if you're familiar with ships,
so simple hierarchy in PowerShell,
we've applied that to your Azure resources-
>> Okay.
>> -so you can easily navigate through
your resources like a file system.
>> Oh, interesting. Okay. So this is like
mounted folders. Like, I can-
>> Yeah, so.
>> -run PowerShell on Windows-
>> Sure.
>> -I can cd
into the environment or cd into the registry.
>> -exactly. So if I do dir here, this pops open
all the subscriptions that I have access to.
>> What?
>> I can navigate into a specific subscription.
>> When did this happen?
>> This has been in PowerShell
and Cloud Shell the whole time.
>> I've been wasting my life.
>> Yeah, it's pretty awesome.
Even here, I bubble up all the resources,
web apps, virtual machines, and some extensible model.
So if we want to add any specific resources
that we get feedback from customers on,
we can easily do that.
>> I love that. I can cd into the cloud.
>> That's right.
>> Awesome, okay.
>> So if I go into my specific resource group,
we actually scope all of your commandlets
that you run within this resource group.
So if I run a get-AzVM-
>> Oh, because whenever I type Az this,
or I use a command that I always have to
pass in this kind of imply-
>> Yeah.
>> Dash, dash.
>> You normally have to do
AzVM specify a resource group name.
You don't have to do that when you're within
the Azure drive when you're within a specific resource.
>> Okay. Because it's implicit.
>> It's implicit, yep. So if I run this,
I get only the VMs that are in this resource group,
not all the VMs I have access to.
>> That's cool. Now, might
Windows people are super Windows fans,
be a little bit upset or concerned?
They're like, "Wait a second. PowerShell on Linux?
I don't want to run Linux."
But this is PowerShell.
>> Yeah.
>> It's the PowerShell that they know already.
It's just running in a Linux container.
>> Yep. This is the same PowerShell experience
that users know and love.
It's running on a Linux container
for the purposes of Azure Cloud Shell.
You're not managing that specific container,
you're managing other resources.
>> Nice.
>> So any of the commandlets that you
used to manage Azure resources are here
and available and it shouldn't really make
an impact on a Windows users who are familiar.
>> Because it's PowerShell,
you are piping objects.
>> Yep. Piping's also there.
The exact same experience that you
know and love with PowerShell is available.
>> Just on the side,
just because I'm a huge fan and I've been
a lover of PowerShell for 12 years.
>> Yeah.
>> You know, I got PowerShell Core
running on my Raspberry Pi.
>> Yeah, awesome.
>> It's amazing to me that I can run it on a tiny,
embedded system or in the cloud,
and it's everywhere that I want it to be.
>> Yep. We have PowerShell IoT.
It's all open-sourced on GitHub.
It's a pretty awesome project.
>> Fantastic. So you've scoped everything
down where I just say get-AzVM.
There's no big, long line of dash,
dash this and dash, dash that.
>> Yep, exactly. So it's all scoped down.
We're focused on making
the user experience smooth and easy and quick.
>> Okay.
>> So with that, we've heard the feedback that remoting
into the VMs is painful and configuring those VMs,
and so what we've done is we've
added some additional commandlets.
So we've enabled AzVMPSRemoting,
and all you have to do is specify a name.
You can specify a resource group name,
but since I'm within this resource
group that's not necessary,
and you specify a protocol.
So with this, that's either SSH or we also
have classic PowerShell remoting over HTTPS using one RM,
and then this will go and
configure that VM to enable remoting.
These VMs I already have here.
I already have it remote and enabled,
so I'm not going to show that today.
It's going through overrun command
and doing all that configuration,
so it might take a little bit.
>> I noticed though that you have
a Linux VM and a Windows VM.
>> Yes. So with PowerShell Core,
you can do partial remoting classic over one RM into
a Windows machines or with SSH into the Linux machines,
and if you have OpenSSH on your Windows machine,
you can also do remoting over SSH into a Windows machine.
>> Wow. It feels like in
no time we went from one choice too many choices.
>> Yeah, and we want to make it the most simple
and intuitive experience for users.
So we don't want to make users have to re-learn or learn
a second tool set if they're familiar with one already.
>> Can I invoke commands,
can I push commands into a virtual machine?
>> Yeah. Let's just go into the Linux VM.
So I can do run an invoke-AzVMCommand.
>> Okay.
>> I can specify the name of the VM I want.
So let's just do the Linux one.
>> It's so funny that it looks like PowerShell,
but I keep forgetting you're in a browser.
>> Yeah, and if you think about it, it's really awesome.
I'm in a browser besides Edge, right?
I'm in Chrome and I can go and do management of
my Azure resources from a Linux container,
and I'm running Windows on this machine
but it doesn't really matter.
You could be on a Mac. You could be-
>> Or a Chromebook.
>> Or a Chromebook, yeah.
I was talking to a customer
and they were using it mainly from their iPad
using Safari to manage Azure resources.
>> That's awesome.
>> Which is kind of incredible, right?
>> That's amazing.
>> Yeah. So, we're doing "Invoke" command.
You always had to specify your ScriptBlock.
So, let's just show it's a Linux VM, uname-a.
>> All right. Even though you're running PowerShell,
all the same Linux commands are available too.
>> They all still carry over.
>> So, you could lsb_release -a, or uname or whatever.
>> Yeah, and I can specify a key file paths
so we're honoring those SSH keys
that you already have set up.
>> That is in your Cloud drive?
>> Yes, the keys are saved
and persisted in my home directory.
So, anything in your home directory gets persisted
across sessions and that includes your Cloud drive.
The Cloud drive surfaces anything saved in
it other ways that the Azure file shares get surfaced.
So, If you have the Azure Storage extension
for VS Code, for example,
you can go through and navigate through
your Cloud drive through that extension.
>> Fantastic, and it is worth pointing out
that you're not paying for any of this compute,
you're only paying for the Cloud
drive so you have a couple
of gig drive for your Cloud drive.
The very very first time you go to shell.azure.com,
they'll say, "Hey, what storage account do you want?"
You pay a little bit for that.
A little bit of persistent storage
and the rest of this is free.
>> Yep, so all of the compute power that/s
being run is free for Azure users.
You only pay for that small amount of storage that we [inaudible]
>> It is really pennies like not much.
>> Yes, it's not much were the image that we save
is five gigs so it's really small.
Yeah, so as you can see I've set up
this invoke command onto a Linux machine.
>> Okay.
>> So, I've specified my ScriptBlock,
we honor SSH keys and then I've also specified
a username so we know who to SSH in S. So,
what we're doing here is we're going and
validating the specific resources and
so on our end
we make sure that this resource group actually exists.
We go through and we find the specific IP of
this VM and then we
will go and use invoke command on that specific machine.
You can see here that yes we are on
a Linux VM and it works really smoothly,
all I have to do is supply a couple
of parameters and you don't have to go through step 1,
2, 3, to find the IP and then remote to that VM.
>> Again, you're using the resource group that
was picked up implicitly by location.
>> Yeah, I didn't specify the resource group because I'm
within damaerteDemo resource group already.
If I was outside of this, I would
specify the resource group.
>> Oh my goodness. Love it, love it, love it.
>> Yes. It's awesome.
We also have the enter azvm.
So, if you don't want to do just more ad hoc,
you can go into and enter
azvm and again you specify your name.
So, let's do the Windows machine [inaudible]
>> Is this the SSH equivalent, entering the VM?
What are we doing when we enter a VM? Are we-
>> It's the same as PowerShell remoting.
>> Okay.
>> So, yeah we're using WinRM here to remote
into this Linux VM, or this Windows VM.
>> Okay, all the Windows VM?
>> Yeah. So, we're going to the Windows VM now and
I can specify its credentials.
I never like to tape them on
screen so I already have it set up.
>> Nice.
>> I can do Verbose and.
>> These are all optional things.
>> Yes, these are all optional.
I'm just doing these to show
what we're actually doing on our end.
>> Right.
>> Just so users can
get a better idea of what's really happening.
>> Right, the thing I noticed for example you
got the Verbose when it was checking things.
>> Yeah. Here, we're doing the same thing.
We're just resolving to a DNS name instead of the IP.
>> Then the prompt changes and now you are on,
and it's C drive now.
>> Yeah, if I run this-
>> You're on Windows.
>> You can see I'm running Windows PowerShell
5.1 on this Windows machine.
So, even if I'm doing management
of a machine that doesn't have PowerShell Core on it,
I can still do that management.
>> Right, I can see the CLR version right there [inaudible]
>> Exactly. Yeah. So, it's pretty awesome.
>> What's great about this is, it allows
you to use whatever tools make you
happy to manage any kind
of system whether it be Linux or Windows.
I suppose you could manage other Microsoft resources
if you had Exchange or if you had other big systems.
>> Exactly. So, coming soon
we have integration with Exchange.
So, I actually have a demo of that I can show you today.
>> Okay.
>> Let me reconnect.
This isn't currently available,
but it's something we're looking at to
get to get available in the coming weeks.
>> Okay. cool. You heard it here first.
>> Yeah. So, because of that,
there is some initial setup that I
have to do so let me just
run some commands and now we're all good to go.
So, if I do a get-command here.
Currently, in cloud Shell
we have about 4,900 different commandlets available.
>> 4,900?
>> Yes. 4,900. So, if you look. That's already a lot.
There's a lot of function baked in without Exchange.
>> Okay. So, a filtered get-command is your friend?
>> Yeah and if I connect to Exchange.
I pass in my specific identity.
Now, this will take a little bit because
we're going through and
connecting to the Exchange endpoints
and validating my credentials.
>> Is there a relationship between
Exchange and the Exchange systems.
Many of us have worked for companies that have
Exchange on-prem and Office 365?
>> Yes, this is connecting
to the Exchange online that's built into M365.
>> Okay.
>> So, what we're looking to do here
is that management experience
for all your M365 resources was similar to
the same management experience to
your Azure resources pre-Cloud Shell where you'd have
to go and download all these different command lines
and then do your authentication,
how can we wrap that into make it more simple.
>> Very cool.
>> Yeah.
>> Okay, so it's setting up that session.
>> Yeah.
>> Because you're really setting up the environment to
give you all the different things that you want.
>> It's going on validating and
pointing the same commandmlets that I would have
access to as just a normal Exchange.
>> Which added more then?
>> Yes, so it's added more. So, we've actually have
about 700 additional commandlets
just for managing the Exchange.
>> Wow.
>> Yeah, so this is all coming soon.
You can do your get mailbox, set mailbox,
all that great stuff through Cloud Shell and
we bring in that same auth experience as well.
>> So, you could see a world where
an Exchange administrator spends
real-time in here and they live in this experience.
>> Exactly.
>> Rather than click here and right click there,
they're managing their large systems with scripts.
>> Exactly. Yeah, the most that we want to provide
the most efficient experience for our customers.
So, how can we make it more efficient if
they're managing both Azure and Exchange.
So, we're baking it all into
one service available and
just hopefully making it all better.
>> What is a thing that we could do to close.
Can we impose some restriction on someone.
>> Sure, sure, sure.
>> Can we fire someone?
>> Sure. Hopefully not.
Hopefully, I don't have those permissions.
>> I was going to say.
>> Yeah. So, if I just do a quick get mailbox.
We can see all the mailboxes in this environment.
>> That's a lot of mail.
>> Yeah, and just looking
through I can see these conference rooms
have a lot of storage back on it.
>> Yes, I don't see why our conference needs 100 gig.
>> Exactly. So, I can do just a control R,
just to show that's still
the same PowerShell experience you know.
>> Right.
>> I can just do a set mailbox.
>> Right.
>> I'm pulling these conference rooms
and then I'm setting the specific quota of those mailboxes
back down to a more reasonable size [inaudible]
>> Okay, so you're getting a PowerShell array of
objects that are all of the mailboxes
that have the identity starts with conf,
piping the result of that through and then-
>> Exactly.
>> Constraining them.
>> Exactly. So, if I run this,
it'd go and apply all those constraints,
restrict the mailbox size and now it's done already.
So, if I do another get mailbox,
I can see that these have now been constrained down to.
>> Down to 19.
>> Yeah. [inaudible] All of that management
is available through PowerShell and Azure Cloud Shell.
>> So, the Exchange stuff that we saw are coming soon.
This is a great preview but PowerShell Core is up
there and people can check it out at shell.azure.com.
>> shell.azure.com.
We're also available in the Azure portal,
the Azure mobile app,
through Azure docs and Microsoft Learn and we also
have the Azure account extension
available in Visual Studio Code.
>> Fantastic. Some of my favorite things
PowerShell and Azure coming together.
I'm learning all about it today on Azure Friday.