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 ?
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
Try with
$esxcli = Get-EsxCli -VMHost MyEsx -V2
$esxcli.system.coredump.network.get.Invoke()
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
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
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
Thank you for your advise, I tested the script unfortunately the vmhost is empty not sure why
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