DevTest VMs

Lana Granville 1 Reputation point
2020-10-22T20:17:49.93+00:00

Which query can I use to find the start up time of each VM in each DevTest Lab resource group when each VM has their own resource group?

I need to be able to identify which ones aren't being used so they can be removed.

Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
256 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Monalla-MSFT 11,801 Reputation points
    2020-10-23T15:58:51.12+00:00

    Hello @Lana Granville - Thanks for reaching out to us.

    • We have a script to achieve this. It is not published in our docs yet, but we have a plan to publish in the docs pretty soon.
    • Attached a script to detect stale DTL virtual machines.
    • It’s currently using a library that we’re working on (you’ll see the download code for the library at the top of the script).
    • The script will find any DTL VMs that haven’t had any ‘start’ events (either in compute or DTL) in the past week.

    NOTE: if the VM is always running it won’t have start events, the script is assuming you’re using a shutdown schedule but is easy to modify. It also outputs the results (doesn’t delete any VMs) but that’s also something easy to add.

    Hope this helps. If the response helped, please "Accept as Answer" and "Upvote" the same

    34578-get-vmstartups.txt