Reporting‎ > ‎

What VMs have HotPlug Enabled?

posted Jul 12, 2013, 11:31 AM by Kris Knight   [ updated Apr 3, 2015, 11:01 PM ]
I forget where I found this but it works great if you export it as a CSV then format as table it in Excel! Make a .PS1 and use  ./Get-HotPlug | Export-Csv -UseCulture

$VMs = @("VM1","VM2","VM3")

ForEach ($VM in $VMs)
    {
        Get-VM $VM | Get-View | Select Name, `
        @{N="CpuHotAddEnabled";E={$_.Config.CpuHotAddEnabled}}, `
        @{N="CpuHotRemoveEnabled";E={$_.Config.CpuHotRemoveEnabled}}, `
        @{N="MemoryHotAddEnabled";E={$_.Config.MemoryHotAddEnabled}}
    }
Comments