Orphaned Files

May been a few years old but the below post from legendary PowerCLI vExpect Luc Dekens is very much still worth checking out…. Awesome script for finding orphaned files on your datastores! During a recent audit i managed to located almost 1TB of forgotten vmdks and iso files on numerous datastores.

Anyway, Check it out:

I tend to run it using the following to display within the Powershell Window
Get-Datacenter *DC*| Get-Cluster *Cluster* | Get-Datastore | Get-VmwOrphan | FT
Or to Expect to CSV
Get-Datacenter *DC*| Get-Cluster *Cluster* | Get-Datastore | Get-VmwOrphan | Export-CSV -Filename "Filepath\filename.csv"


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.