lElOUCHE_79
Enthusiast
Enthusiast

Collect Core DUMP configuration

Jump to solution

is there a way to collect the core dump configuration from all servers?

I would like to collect the information in report via script, is that possible?

if yes, can someone help me ?

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

Then change the Select line to

  $results += $esxcli.system.coredump.network.get.Invoke() |
  Select-Object @{N='VMHost';E={$VMHost.Name}} , "Enabled" , "HostVNic" , "IsUsingIPv6" , "NetworkServerIP" ,
  "NetworkServerPort"


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

5 Replies
LucD
Leadership
Leadership

Try with

$esxcli = Get-EsxCli -VMHost MyEsx -V2
$esxcli.system.coredump.network.get.Invoke()


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
lElOUCHE_79
Enthusiast
Enthusiast

I tried something like this, but I have a report collection issue

 

#Connect to vCenter Server

Connect-VIServer "vCenter@mylabs.local"

$VMHosts= Get-VMHost | ? { $_.ConnectionState -eq "Connected"} | Sort-Object -Property Name
$results= @()

foreach($VMHost in $VMHosts) {
$esxcli = Get-EsxCli -VMHost $VMHost -V2
$esxcli.system.coredump.network.get.Invoke()

}
Export-Csv -Path .\coredump_Report.csv "VMHost" , "Enabled" , "HostVNic" , "IsUsingIPv6" , "NetworkServerIP" , "NetworkServerPort" -NoTypeInformation -UseCulture $results

0 Kudos
LucD
Leadership
Leadership

The foreach statement doesn't place anything in the pipeline.
Try something like this

#Connect to vCenter Server

Connect-VIServer "vCenter@mylabs.local"

$VMHosts= Get-VMHost | ? { $_.ConnectionState -eq "Connected"} | Sort-Object -Property Name
$results= @()

foreach($VMHost in $VMHosts) {
  $esxcli = Get-EsxCli -VMHost $VMHost -V2
  $results += $esxcli.system.coredump.network.get.Invoke() |
    Select "VMHost" , "Enabled" , "HostVNic" , "IsUsingIPv6" , "NetworkServerIP" , 
      "NetworkServerPort"
}

$results | Export-Csv -Path .\coredump_Report.csv  -NoTypeInformation -UseCulture 


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
lElOUCHE_79
Enthusiast
Enthusiast

Thank you for your advise, I tested the script unfortunately the vmhost is empty not sure why 

0 Kudos
LucD
Leadership
Leadership

Then change the Select line to

  $results += $esxcli.system.coredump.network.get.Invoke() |
  Select-Object @{N='VMHost';E={$VMHost.Name}} , "Enabled" , "HostVNic" , "IsUsingIPv6" , "NetworkServerIP" ,
  "NetworkServerPort"


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference