JakeBentz

remove_coredumps

Aug 22nd, 2017
236
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # /=======================================================================
  2. # /=
  3. # /=  remove_coredumps.ps1
  4. # /=
  5. # /=  AUTHOR: Jake Bentz
  6. # /=  DATE: 08/22/2017
  7. # /=
  8. # /=  REQUIREMENTS: N/A
  9. # /=
  10. # /=  DESCRIPTION: This script removes coredump files from all connected hosts
  11. # /=
  12. # /=  REVISION HISTORY
  13. # /=   VER  DATE        AUTHOR/EDITOR   COMMENT
  14. # /=   1.0  08/15/2017   Jake Bentz  Created script
  15. # /=
  16. # /=======================================================================#
  17. #
  18. Get-VMHost | % {
  19.  write-host "Connecting to" $_
  20.  $esxcli = get-esxcli -vmhost $_
  21.  write-host "removing coredump from" $_
  22.  $esxcli.system.coredump.file.remove($null, $true)
  23. }
Comments
  • User was banned
Add Comment
Please, Sign In to add comment