Same issue, need to clean up a datastore, but I need some of that powercli goodness to get this done on a bunch of hosts
#PowerCLI Rocks!
<#
.SYNOPSIS
PowerCLI get core dump location
.EXAMPLE
Connect-viserver <fqdn vcenter>
.\Get-HostCoreDumpFile.ps1
.NOTES
raoconnor 03/10/17
Note:
# Core dump can be network, file, partition and vsan, ie:
$esxcli.system.coredump.network.get()
#>
foreach($vmhost in Get-VMHost){
$esxcli = Get-EsxCli -VMHost $vmhost.Name
$vmhost = $esxcli.system.hostname.get().HostName
Write-Host "$vmhost" -ForegroundColor DarkYellow
Write-Host "Active coredump file:" $esxcli.system.coredump.file.get().Active
Write-Host "Configured coredump file:" $esxcli.system.coredump.file.get().Configured
}
# uncomment the following to unconfigure file core dump
<#
foreach($vmhost in Get-VMHost){
$esxcli = Get-EsxCli -VMHost $vmhost.Name
$esxcli.system.coredump.file.set(0)
}
#>