Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
2010-10-06
11:15 AM
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
Any thoughts on this? I'm doing scripting for a lab environment, and using connect-nacontroller in the script works until I get halfway through the 150 or so flexclones I'm creating, and then I get errors stating that the variable stored globally (I can't remember what it is, but I think it's $global:nacontroller) is not of type "netapp controller" (again, I don't remember the actual wording here, sorry). I'm open to any suggestions that may help.
Solved! See The Solution
View By:
3 REPLIES 3
2010-10-06
12:18 PM
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
When I work with many controllers, I generally put the controller objects in an array, then work with the array. You can find an example here: http://communities.netapp.com/docs/DOC-6293
J
Re: When using the "-controller" option with commands such as get-navol I get "Get-NaVol : API invoke failed."
2010-10-07
11:06 AM
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
The "-controller" parameter is expecting an object of type NetApp.Ontapi.Filer.NaController, not of type System.String.
As a result, the code below is correct.
$netappCred = Get-Credential -Credential "root"
$controller = Connect-NaController -Name "filername" -Credential $netappCred
$vols = Get-NaVol -Controller $controller
The code below here, is incorrect
$netappCred = Get-Credential -Credential "root"
$controller = Connect-NaController -Name "filername" -Credential $netappCred
$vols = Get-NaVol -Controller "filername"
I hope this helps.
Bill
3
Replies
Re: When using the "-controller" option with commands such as get-navol I get "Get-NaVol : API invoke failed."
2010-10-11
01:02 PM
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content
After choosing the array route, I now am getting RPC server unavailable errors. Any thoughts? This also occurs when I try to use connect-nacontroller directly from PS.