Quantcast
Channel: VMware Communities : All Content - VMware PowerCLI
Viewing all articles
Browse latest Browse all 16717

Return code from new-snapshot

$
0
0

My PowerCLI script includes the following statement:

 

 

get-vm$myvm|new-snapshot-name$mysnapshotname-Description$mydescription

 

 

It works fine, but I need to insert a test to see if the snapshot creation was successfull.

  • How can I get and test a returncode from new-snapshot?
  • How can I simulate an error in creating a snapshot in my lab environment in order to test my script?

Regards

marius

 

 

 


Viewing all articles
Browse latest Browse all 16717

Trending Articles



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