Power CLI command

Doodad Boy
Doodad Boy used Ask the Experts™
on
How to perform a specific VM Disk Consolidation using power cli

Get-VM "MyVM" | which command need to be use after the pipeline to perform disk consolidation
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Infrastructure Analyst
Commented:
Get-VM |
Where-Object {$_.Extensiondata.Runtime.ConsolidationNeeded} |
ForEach-Object {
  $_.ExtensionData.ConsolidateVMDisks()
}

Open in new window


That'll get the VM's, get the VM's that need consolidation and then do the job.

Regards,

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial