2016-08-31 12:17 AM - last edited on 2016-08-31 05:20 AM by Li-Jacques
Can somebody point me to the powershell cmdlet which can be used to check whether the 7mode controller is up or down.
Solved! SEE THE SOLUTION
2016-08-31 06:43 AM
If a Controller is down, then the 'Connect-NaController' cmdlet itself should fail. You can catch the error.
Or as said above, Ping should suffice.
2016-08-31 06:51 AM
thanks for the reply Shashanka,
but the Connect-NaController' cmdlet can fail with many other errors out of which wrong credentials is one of them.
I need to catch the specific error for the scenario where the controller is down or not reachable.
can you point me to some resources where i can get the specific errors thrown by powershell cmdlets? or in this scenario which specific error object needs to be catched?
like it is "NetApp.Ontapi.NaAuthException" in the case of wrong credentials.
2016-08-31 07:26 AM
thanks for the solution,
but where can i get document refernce for the exceptions thrown by Netapp powershell toolkit cmdlets?
to perform better error handling
2016-08-31 07:41 AM
hmm.. are you building out intensive error handling. if not I wouldn't worry about it. I think you are overthinking things, i've been coding since 1.0, and i don't require what you are asking for
2016-08-31 07:52 AM
ok i have a situation,
where i am running snapmirror update,but it fails throwing an error as there is no new data to update,
How can i handle this particaular situation without stoping my script execution,as this a valid error.