Skip to content

Instantly share code, notes, and snippets.

@rdronov
Created October 11, 2018 02:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdronov/0ae6ff54ca029fc7a5b6379334193fc9 to your computer and use it in GitHub Desktop.
Save rdronov/0ae6ff54ca029fc7a5b6379334193fc9 to your computer and use it in GitHub Desktop.
This script checks the core dump location for ESXi hosts.
# File name: Get-VMHostCoredumpLocation.ps1
# Description: This script checks the core dump location for ESXi hosts.
#
# 11/10/2018 - Version 1.0
# - Initial Release
#
# Author: Roman Dronov (c)
# Get information about the core dump location for ESXi hosts
Write-Host "`nCore Dump Settings:`r" -ForegroundColor Green
ForEach ($vmhost in $(Get-VMHost | sort Name)) {
$esxcli2 = Get-EsxCli -VMHost $vmhost -V2
$esxcli2.system.coredump.file.get.Invoke() | Select @{N='Host Name';E={$vmhost}},@{N='Active Core Dump File';E={$_.Active}} #| Format-List
}
Clear-Variable vmhost,esxcli2 -Scope Global
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment