Created
May 29, 2014 08:44
-
-
Save HostileCoding/a0161711803ee0077c79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Variable declaration | |
| $vCenterIPorFQDN="192.168.243.172" | |
| $vCenterUsername="[email protected]" | |
| $vCenterPassword="vmware" | |
| $destination = "C:\Users\Paolo\Desktop" #Location where to download support bundles | |
| Write-Host "Connecting to vCenter" -foregroundcolor "magenta" | |
| Connect-VIServer -Server $vCenterIPorFQDN -User $vCenterUsername -Password $vCenterPassword | |
| $hosts = Get-VMHost #Retrieve all hosts from vCenter | |
| Write-Host "Downloading vCenter support bundle" -foregroundcolor "magenta" | |
| Get-Log -Bundle -DestinationPath $destination | |
| foreach ($esxihost in $hosts){ | |
| Write-Host "Downloading support bundle for ESXi host $($esxihost.Name)" -foregroundcolor "magenta" | |
| Get-Log -VMHost (Get-VMHost -Name $esxihost.Name) -Bundle -DestinationPath $destination | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment