Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Powercli- To get scratch location, NTP, Esxi host verison and hyperthreading status

To get scratch location details on each cluster , NTP and Hyperthrading details through powercli script.

Login powercli and run the below details.

# Connect-VIserver

enter the VCSA name

To get scratch location details:-

PS C:\> Get-Cluster "Clustername" | Get-VMHost -Name * | Get-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation"

NTP details on specific cluster:

Get-Cluster "Clustername"|Get-VMHost | Sort-Object Name | Select-Object Name, @{N=”Cluster”;E={$_ | Get-Cluster}}, @{N=”Datacenter”;E={$_ | Get-Datacenter}}, @{N=“NTPServiceRunning“;E={($_ | Get-VmHostService | Where-Object {$_.key-eq “ntpd“}).Running}}, @{N=“StartupPolicy“;E={($_ | Get-VmHostService | Where-Object {$_.key-eq “ntpd“}).Policy}}, @{N=“NTPServers“;E={$_ | Get-VMHostNtpServer}}, @{N="Date&Time";E={(get-view $_.ExtensionData.configManager.DateTimeSystem).QueryDateTime()}} | format-table -autosize

NTP details on specific vCenter:

Get-VMHost | Sort-Object Name | Select-Object Name, @{N=”Cluster”;E={$_ | Get-Cluster}}, @{N=”Datacenter”;E={$_ | Get-Datacenter}}, @{N=“NTPServiceRunning“;E={($_ | Get-VmHostService | Where-Object {$_.key-eq “ntpd“}).Running}}, @{N=“StartupPolicy“;E={($_ | Get-VmHostService | Where-Object {$_.key-eq “ntpd“}).Policy}}, @{N=“NTPServers“;E={$_ | Get-VMHostNtpServer}}, @{N="Date&Time";E={(get-view $_.ExtensionData.configManager.DateTimeSystem).QueryDateTime()}} | format-table -autosize

Hyperthreading status on cluster:-

Get-Cluster "Clustername"|Get-VMHost | Select-Object Name,HyperthreadingActive

Get ESXI host build and verions details:-

Get-Cluster "" | Get-VMHost | Select @{Label = "Host"; Expression = {$_.Name}} , @{Label = "ESX Version"; Expression = {$_.version}}, @{Label = "ESX Build" ; Expression = {$_.build}}




This post first appeared on Vmkfix, please read the originial post: here

Share the post

Powercli- To get scratch location, NTP, Esxi host verison and hyperthreading status

×

Subscribe to Vmkfix

Get updates delivered right to your inbox!

Thank you for your subscription

×