We have a lot of new metric goodness, including cost, size, performance, state, and other metrics from Azure entities such as subscriptions, resources groups, virtual machines (VMs), and virtual disks. But we want more. You want more. We all want more. MORE, I SAY!
To further extend the functionality of our Microsoft Azure integration, we have seven new scripts (the first of many), designed specifically for Azure. These new scripts allow you to do the following, straight from the Real-Time DX Console:
But before you get started with these scripts, there are some prerequisites. First, you need to add your Azure environment as a monitored resource (this is pretty straightforward).
The second thing you will need is the Service Principal for Azure. You can, of course, use the existing one for your Azure connection (as created in the previous step), but we recommend setting up a new one just for running the scripts. You can make this a more restricted Service Principal for some extra safety, and for auditing it’s also useful to keep these separate.
Sound complicated? Of course not! Because we also created a script action for that! This script creates a local XML credential file on each target, which should be all Consoles machines and Monitors that will be used to run scripts against your Azure environment.
Here’s how to use it:
This script can perform numerous power actions on an Azure machine: start, stop, shutdown, turnoff, restart, deallocate, or hibernate (hibernate is not possible in Azure yet, but it is an upcoming feature).
This script can change the machine disk type to Standard_LRS, Premium_LRS, StandardSSD_LRS, UltrSSD_LRS, Premium_ZRS or StandardSSD_ZRS.
Who needs an Azure portal anyway? With this script, you can resize machines right from ControlUp! Specify the name—or partial name—of a VM size, such as B2s (note that the name of the new size must be unique).
Beware, if the machine is On it will reboot for this action. And make sure you get the machine type right; a mistake here can be quite costly…
If you have Microsoft Defender for Servers, you can RDP directly to a machine using JIT VM access. But not everybody is paying for that, and, using this script, we can do it for free. It creates the required public IP and NSG rule (if the machine does not have them yet) and launches MSTSC.EXE to start the remote session. And after you are done and close mstsc.exe, the public IP and NSG are automatically removed again (unless they already existed before the script was run, in which case they are left in place of course).
There is no need to configure any input parameters: simply enter the required credentials for your remote session as normal. Output is an RDP session, and when closed (if the script timer has not run out), output will show the rule has been removed again.
NOTE: If the script has timed out because the session lasted longer than the script timer, the network rule is still removed, but the output will not show it.
This script gets the details of the machine’s network configuration. No input is needed; just run it on the target:
This script can turn a machine’s Boot Diagnostics on or off. Azure Boot Diagnostics can help with analyzing boot failures and must be enabled for the AZ Get console screenshot script to work!
Sometimes a good old-fashioned screenshot is what you need. This script can take a screenshot of the console session of a machine and save it.
NOTE: Boot Diagnostics must be enabled for this script to work!
Our team is busily at work developing a slew of new, useful scripts We are working on additional scripts for Azure and Azure Virtual Desktop (AVD), including an extended cost report script. In fact, Trentent Tye (a Tech Person of Interest™️) is working on a cool trigger that can change the disk to a cheaper version when a machine is powered down, saving costs for these machines (and at X o’clock, the disk is changed back to a faster / more expensive type). These savings can quickly add up fast infor larger environments.
Once available, we will have some deep-dive posts on our blog. But we can always do more! If there any Azure related scripts you would like to see, please let us know at email@example.com. In the meantime, if you are not a ControlUp Real-Time DX customer yet, get started with a free trial today!