-->

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 "<cluster_name>" | Get-VMHost | Select @{Label = "Host"; Expression = {$_.Name}} , @{Label = "ESX Version"; Expression = {$_.version}}, @{Label = "ESX Build" ; Expression = {$_.build}}


To get Mem.ShareForceSalting on Esxi hosts:-

Get-Cluster "clustername"| Get-VMHost -Name * | Get-VMHostAdvancedConfiguration -Name "Mem.ShareForceSalting"


To get esxi host advance settings details 

# Get-VMHost hostname | Get-AdvancedSetting | sort | ft -AutoSize

To capture excel sheet

# Get-AdvancedSetting -Entity hostnamem | Export-Csv -Path D:\folder\output\hostnameprofile-config.csv -NoTypeInformation

Powercli- To get scratch location, NTP, Esxi host verison and hyperthreading status Powercli- To get scratch location, NTP, Esxi host verison and hyperthreading status Reviewed by Virtulization on January 05, 2023 Rating: 5

No comments:

Home - PageNavi (show/hide)

hide
Powered by Blogger.