VMDK
Finding orphaned VMDK’s using PowerCLI
Here is a PowerCLI script I use to find all orphaned VMDK’s in my vCenter environment. $arrayVC = “virtualcenter2” Foreach ($strVC in $arrayVC) { Connect-VIServer $strVC $arrUsedDisks = Get-VM | Get-HardDisk | %{$_.filename} $arrUsedDisks += get-template | Get-HardDisk | %{$_.filename} $arrDS = Get-Datastore Foreach ($strDatastore in $arrDS) { $strDatastoreName = $strDatastore.name $ds = Get-Datastore -Name […]
Tags: PowerCLI, PowerShell, VMDK
Posted in PowerCLI, Powershell, Virtualization, vmware | No Comments »