Open mike9231 opened 8 years ago
To get around this I overread $FullVM in this plugin to include templates: $FullVM = Get-View -ViewType VirtualMachine
In 00 Conection Plugin for vCenter, $FullVM is initialized as such $FullVM = Get-View -ViewType VirtualMachine | Where {-not $_.Config.Template}
Another way is adding the following line $arrUsedDisks += $VMTmpl | Get-HardDisk | %{$.Filename} below the line that reads $arrUsedDisks = $FullVM | % {$.Layout} | % {$.Disk} | % {$_.DiskFile} in 109 Orphaned VMDK Files.ps1
This plugin is reporting .vmdk files associated with templates as being orphans. Is there any easy way to exclude templates from this check? Or better yet, to do the check against .vmtx files in addition to .vmx files.
Thanks!