Script Library

Boost your management, troubleshoot, and remediation capabilities with scripts created by experts in the IT community.

<< Back to Script Library

Tag: unused

(3 Scripts)
Use Azure Log Analytics data to find AVD Session Hosts which have not hosted any user sessions in the given timeframe. This can include both those powered up, which will likely incur more cost, as well as those not powered up.
Requires previously saved credentials for Azure for the user that runs the script - these can be stored using a ControlUp script.
Version: 1.0.7  |   Created: 2024-02-07  |   Modified: 2024-02-25  |   Creator: Guy Leech  |   Downloads: 4
Works at the resource group which contains the VM the script is run against
Version: 2.1.11  |   Created: 2022-08-01  |   Modified: 2022-09-18  |   Creator: Guy Leech  |   Downloads: 22
Uses data from the Azure Monitor API to find resources which have not got an entry in the logs in the given period which could mean that they have not been used in that time and be candidates for removal for simplifcation and cost reduction, depending on the resource type. Resources not directly in the logs, such as network interfaces, will be checked by looking for log entries for their parent VM.

Only resources within the same resource group as the chosen resource can be searched or all rescure groups for the tenant depending on the parameters passed.

The output can be sorted/grouped by any of the output columns.

Parameters to specifically include and/or exclude providers by regular expression are available.

Note that not all resources when used will generate an activity in the log so may be shown as no being used when they have actually been used in the given time period.
Version: 3.2.26  |   Created: 2022-08-01  |   Modified: 2024-02-25  |   Creator: Guy Leech  |   Downloads: 50