Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
powershell cmdlet to check whehter 7mode controller is up or down
2016-08-31
12:17 AM
9,674 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can somebody point me to the powershell cmdlet which can be used to check whether the 7mode controller is up or down.
Thanks.
Solved! See The Solution
1 ACCEPTED SOLUTION
Aravind has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Again, this is not that difficult.
If you are insistent on using powershell, use test-connection.
I think you can mark this closed
11 REPLIES 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What's wrong with Ping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Aravind has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Again, this is not that difficult.
If you are insistent on using powershell, use test-connection.
I think you can mark this closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You shouldn't get an error, paste error here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the error message is "Snapmirror error:source contains no new data; suspending transfer to destination"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is this 7-mode or cdot. I am not seeing that behavior. Even if a snapmirror is up-to-date, it will transfer specific bytes to tell itself that and the lag woul dbe back at 0 What commands are you running Then run the same command from the commandline and then then snapmirror status -l
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you just want to bypass the error, then u can use the option
-ErrorAction SilentlyContinue
