Azure Quick Tip: Listing disks not attached to any virtual machines

One of the advantages of the cloud is the elasticity where we can provision resources to address our most urgent issues. One problem, though, is the ability to clean up the environment when such resources are no longer needed. In today’s Azure Quick Tip, we are going to be listing all disks not attached to any virtual machines. That will help you to reduce costs if they are no longer required.

Get-AzDisk | where-Object { $_.DiskState -eq “Unattached” } | select Name,ResourceGroupName,Location,TimeCreated

disks not attached to any virtual machines

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top