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

PowerCLI Error Handling

$
0
0

I"d like to storage vmotion vms with move-vm and then if there are any errors, put them in an email and email them to me

 

get-vm | %{

move-vm -datastore datastore100

}

 

If one VM fails I don't want to abort the whole script, just catch whatever the error was on that one vm and email it to myself and go to the next one.  Is this possible?


Viewing all articles
Browse latest Browse all 182126

Trending Articles



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