Quantcast
Channel: VMware Communities : Discussion List - Automation Tools
Viewing all articles
Browse latest Browse all 9071

Output Success from "set-vm - snapshot"

$
0
0

I am running this to revert to a specified snapshot on a list of VMs imported from csv file.

 

Set-VM $_.Name -Snapshot "BASELINE" -confirm:$false | Format-list | out-file -append c:\vsphere\results\revert.txt

 

What I'd like is an output file that states whether the revert job was sucessful but the powercli output from a successful revert is this:

 

 

 

Name            : VM-XXX1
PowerState      : PoweredOff
NumCpu          : 2
MemoryMB        : 2048
HardDisks       : {Hard disk 1}
CDDrives        : {CD/DVD drive 1}
FloppyDrives    : {Floppy drive 1}
NetworkAdapters : {Network adapter 1}
UsbDevices      : {}
Host            :
Id              : VirtualMachine-2
Notes           :

 

 

Name            : VM-XXX2

PowerState      : PoweredOff
NumCpu          : 1
MemoryMB        : 4096
HardDisks       : {Hard disk 1, Hard disk 2}
CDDrives        : {CD/DVD drive 1}
FloppyDrives    : {Floppy drive 1}
NetworkAdapters : {Network adapter 1}
UsbDevices      : {}
Host            :
Id              : VirtualMachine-3
Notes           :

 

In the vSphere GUI the event is registered as:

 

The execution state of the virtual machine has been
reverted to the state of snapshot BASELINE, with ID 10
info
28/08/2012 12:56:18
VM-XXX1

 

How can I get "set-vm -snapshot" to output something similar to what is reported in the GUI?


Viewing all articles
Browse latest Browse all 9071

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>