So now we're at a cmd console, and if we want to get into PowerShell, we
can simply type PowerShell, and now we can do a get‑command to see what
commands are available on this endpoint. And it's just running through
them all, and I'm going to Ctrl+C to break display, but you see the point
here. We now are able to use PowerShell in the old compiled executables.
We're on the file system of the virtual machine with administrative
privilege, so the idea is that we may hopefully be able to fix up problems.
I mean, with the registry, you can do registry modification
with PowerShell if you need to work with environment variables,
or services, or Windows features, all of that is totally in scope for you.
And then when we're finished with the serial console, we can just close the
window and we're done, all right? Okay, that just about wraps us up. One last
thing I want to do is go over to Azure Monitor, and I show you how to use the
Virtual Machines insight solution elsewhere in the course. This is a workbook
that allows you to dive in and view pre‑created graphics that show you, in
this case, this is a feature called Service Map, which will show dependencies.
We can see running processes on that machine,
we can see inbound client connectivity and their IP addresses,
outbound connectivity to remote machines,
what ports,
what servers this machine is connecting from. Very powerful tool
indeed. The VM Insights also has a number of performance related
metrics that we can look at. As you can see here, we can easily take a
look at the storage of this machine, the OS disk, and the temp disk,
the utilization, we can see our memory, available memory.
All of these are called metrics views, and metrics is
time‑sampled numeric data that, in this case these metrics views
were created for us, they're curated for us by Microsoft based
on working with their customers, what they find to be most helpful.
Now you always can come into Metrics Explorer yourself
if you know what you're looking for.
You can select your scope, what you're looking for.
I think my monitor is in here, so let me select that
monitorvm from the list, and then we can come in and gather
from any of these available metrics.
Now the metrics that are available, Azure always collects baseline
metrics, but if you want to go beyond just the baseline,
you're going to need to enable diagnostic settings for that machine.
Percent CPU, that's a pretty common one.
And again,
just to mention it one more time, the idea is you might realize, whoa,
this machine is pretty constrained CPU‑wise. There, you might think that
you would resize the machine or maybe it's just periodically you wonder
if the machine is being constrained.
You can create an alert rule that will do an evaluation whenever
that metric value exceeds a certain threshold, let's say, that
would trip off the alert and you can configure notifications as
well as code to run automatically in response to that alert firing. Pretty powerful stuff.