arjanhs
Enthusiast
Enthusiast

I'm running the following two PowerShell command's within a scheduled task for this. It will check is any consolidation is needed, and when needed the disk is consolidated.

Get-VM | Where-Object {$_.Extensiondata.Runtime.ConsolidationNeeded}

Get-VM | Where-Object {$_.Extensiondata.Runtime.ConsolidationNeeded} | ForEach-Object { $_.ExtensionData.ConsolidateVMDisks()}

Reply
0 Kudos