VMware Cloud Community
Pete_Howarth
Enthusiast
Enthusiast
Jump to solution

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

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}}

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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
Jump to solution

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

Pete_Howarth
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos