Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 180329

Verifying Hot Add/Plug Setting on VM

$
0
0

I am trying to determine the best way to display the Memory and vCPU Hot Add/Plug settings in the PowerCLI console. I am currently using this code to display these settings but I am not sure if the output is correct or if I can adjust it any way to improve it:

 

   Get-Datacenter|Get-VM|Get-View|Select $($row.Name),

  @{N="CpuHotAddEnabled";E={$_.Config.CpuHotAddEnabled}},@{N="MemoryHotAddEnabled";E={$_.Config.MemoryHotAddEnabled}} |

   write-host-foregroundcolorgreen

   Write-Host""

 

The output from this code is:

@{VM1=; CpuHotAddEnabled=True; MemoryHotAddEnabled=True}

@{VM1=; CpuHotAddEnabled=True; MemoryHotAddEnabled=True}

@{VM1=; CpuHotAddEnabled=False; MemoryHotAddEnabled=False}

@{VM1=; CpuHotAddEnabled=False; MemoryHotAddEnabled=False}

 

 

I have verified that both Memory and vCPU Hot Add/Plug settings are enabled and the output is somewhat confusing me - it correctly indicates that both are enabled but then proceeds to show that their enabled status is 'False' in the proceeding lines. I am wondering if there is any adjustment possible to improve this to only show the true status of these settings.

 

Thank you for any help you may provide,


Viewing all articles
Browse latest Browse all 180329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>