Pete_Howarth
Contributor
Contributor

VM List hot add cpu/mem status restrict to cluster or show cluster name

Jump to solution

Hey guys  How do I get the script below to just be restricted to a specific cluster or have the script include the name of the cluster the vm's are in as well?

 

Thanks,

 

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

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

Something like this

Get-Cluster -Name 'MyCluster' |
Get-VM | | Get-View | Select Name,
@{N="CpuHotAddEnabled";E={$_.Config.CpuHotAddEnabled}},
@{N="CpuHotRemoveEnabled";E={$_.Config.CpuHotRemoveEnabled}},
@{N="MemoryHotAddEnabled";E={$_.Config.MemoryHotAddEnabled}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

2 Replies
LucD
Leadership
Leadership

Something like this

Get-Cluster -Name 'MyCluster' |
Get-VM | | Get-View | Select Name,
@{N="CpuHotAddEnabled";E={$_.Config.CpuHotAddEnabled}},
@{N="CpuHotRemoveEnabled";E={$_.Config.CpuHotRemoveEnabled}},
@{N="MemoryHotAddEnabled";E={$_.Config.MemoryHotAddEnabled}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Pete_Howarth
Contributor
Contributor

Strange I was doing something like that.  Need my glasses checked.  Thanks Luc that worked.

0 Kudos