What is the problem with running that function?
In the end it's nothing more than calling the function with parameter that indicates the datastore.
Yes it shows perfectly, but i was thinking incase if snapshot is present on that VM, will it consider that VM or not.
so only, i have decided to create with excluding that.
in that case, can you please help.
The script uses the LayoutEx.File property to get the files that belong to a VM.
So even if there are multiple snapshots, all the files will be included, and hence not shown in the list of orphaned disks.
so even if the vm is holding snapshot, report will show only the genuine orphaned disks right?
That is correct.
But as always, make sure you know what you are doing before you start deleting files