PoshCode Archive  Artifact [782a1f29b9]

Artifact 782a1f29b930d520124c2c344f1072f0b472ed51085ec9af54c6e2b1f405be21:

  • File PowerCLI-error-report.ps1 — part of check-in [6aea18b059] at 2018-06-10 13:04:10 on branch trunk — Generating error report bundle for VMware PowerCLI / vSphere (user: unknown size: 616)

# encoding: utf-8
# api: powershell
# title: PowerCLI error report
# description: Generating error report bundle for VMware PowerCLI / vSphere
# version: 0.1
# type: script
# license: CC0
# x-poshcode-id: 2019
# x-archived: 2010-07-26T15:33:50
#
#
$moveVmScript = { 
	Connect-VIServer yourVCenterServer
	Move-VM WinXP -Location yourDestinationHost
}
$ moveVmScript | Get-ErrorReport -ProblemScriptTimeoutSeconds 120 -ProblemDescription "An error is returned by Move-VM. The operation should be successful. The same can be done via the vClient." -Destination 'D:\bug report' –DontIncludeServerLogs