-->

Powercli- To get SSH,Lockdown,Powerpolicy and ESXiShellInteractiveTimeOut details

This article describes how to collect all esxi hosts information through powercli command.

Login powercli and run the below details.

# Connect-VIserver

enter the VCSA name

 To get SSH Status details for all ESXI hosts in vCenter:-

#Get-VMHost | Get-VMHostService | Where-Object {$_.Key -eq 'TSM-SSH'} | Select-Object -Property VMHost, Key, Label, Policy, Running

ft -AutoSize : Fit the command on page and display.

# Get-VMHost | Get-VMHostService | Where-Object {$_.Key -eq 'TSM-SSH'} | Select-Object -Property VMHost, Key, Label, Policy, Running | sort | ft -AutoSize


To get Lockdown Status details for all ESXI hosts in vCenter:-

#Get-VMHost | Select Name,@{N="Lockdown";E={$_.Extensiondata.Config.adminDisabled}}


#Get-VMHost | Select Name,@{N="Lockdown";E={$_.Extensiondata.Config.adminDisabled}} | sort | ft -AutoSize

To get Powerpolicy Status details for all ESXI hosts in vCenter:-

Get-VMHost | Select Name, @{N='Current Policy';E={$_.ExtensionData.Hardware.CpuPowerManagementInfo.CurrentPolicy}} 


To get ESXiShellInteractiveTimeOut value details for all ESXI hosts in vCenter:-

#Get-VMHost | Select Name, @{N=”UserVars.ESXiShellInteractiveTimeOut”;E={$_| Get-AdvancedSetting -Name UserVars.ESXiShellInteractiveTimeOut | Select -ExpandProperty Value}} | Sort-Object name | ft -a




Powercli- To get SSH,Lockdown,Powerpolicy and ESXiShellInteractiveTimeOut details Powercli- To get SSH,Lockdown,Powerpolicy and ESXiShellInteractiveTimeOut details Reviewed by Virtulization on January 08, 2024 Rating: 5

No comments:

Home - PageNavi (show/hide)

hide
Powered by Blogger.