Looking for a script that will run against all hosts in a vCenter server and output the hyper threading settings to a csv file.
Specifically looking for state of:
UserVars.SupressHyperthreadwarning
VMkernel.Boot.hyperthreading
VMkernel.Boot.HyperthreadingMitigation
I'm sure it's probably an easy thing for those who have done a lot more with PowerShell/PowerCLI.
Try like this
Select Name,
@{N = 'UserVars.SuppressHyperthreadWarning'; E = { (Get-AdvancedSetting -Entity $_ -Name 'UserVars.SuppressHyperthreadWarning').Value } },
@{N = 'VMkernel.Boot.hyperthreading'; E = { (Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.hyperthreading').Value } },
@{N = 'VMkernel.Boot.HyperthreadingMitigation'; E = { (Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.HyperthreadingMitigation').Value } } |
Export-Csv -Path .\report.csv -NoTypeInformation -UseCulture
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
Select Name,
@{N = 'UserVars.SuppressHyperthreadWarning'; E = { (Get-AdvancedSetting -Entity $_ -Name 'UserVars.SuppressHyperthreadWarning').Value } },
@{N = 'VMkernel.Boot.hyperthreading'; E = { (Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.hyperthreading').Value } },
@{N = 'VMkernel.Boot.HyperthreadingMitigation'; E = { (Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.HyperthreadingMitigation').Value } } |
Export-Csv -Path .\report.csv -NoTypeInformation -UseCulture
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LucD... As always, quick to come up with a working solution to what's requested. Now we have a way to get the list...
One quick question... Is there an easy way to have the report.csv file name have the vCenter name in it (at the start)?? That way if it's decided to run this through automation, we can have the report named correctly and not have them write over each other.
Sure, something like this?
Get-VMHost |
Select Name,
@{N = 'UserVars.SuppressHyperthreadWarning'; E = { (Get-AdvancedSetting -Entity $_ -Name 'UserVars.SuppressHyperthreadWarning').Value } },
@{N = 'VMkernel.Boot.hyperthreading'; E = { (Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.hyperthreading').Value } },
@{N = 'VMkernel.Boot.HyperthreadingMitigation'; E = { (Get-AdvancedSetting -Entity $_ -Name 'VMkernel.Boot.HyperthreadingMitigation').Value } } |
Export-Csv -Path $reportName -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Perfect...