ONTAP Discussions

Powershell for cDot


Hey there,


I have connected to one of my vservers running on a cDot cluster version 8.2.3 p6,

as the following:

Connect-NcController <vservername>  -Credential $mycred,


And I received a message saying that I'm connected.


After that, I have tried to run many commands, such as get-navol, get-naqtree and many more,

And I have received the following message everytime:


Get-NaVol : Value in $global:CurrentNaController is not of type NetApp.Ontapi.Filer.NaController
At line:1 char:1
+ Get-NaVol -Name <volname>
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-NaVol], ArgumentException
+ FullyQualifiedErrorId : ControllerNotSpecified,DataONTAP.PowerShell.SDK.Cmdlets.Volume.GetNaVol


Do I have to specify the controller name although i'm at the vserver level?


Even when I do, I get the following error:


et-NaVol : Incorrect credentials for <vservername>.
At line:1 char:1
+ Get-NaVol -Name vmis -Controller <vservername>
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (<vservername>:NaController) [Get-NaVol], NaAuthException
+ FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Volume.GetNaVol


How come the credentials are incorrect if I'm already connected to the vserver? 


Does someone know what is the issue?


Thanks a lot!!



The powershell cmdlets are split into 7-mode and cdot.


The 7-mode ones start with get-na


the cDot ones start with get-nc


Try this.





In addition to using NC commands, use connect-nccontroller to connect to the cluster, not a vserver.  You can use it with -vserver to tunnel commands to a vserver, although I find that rarely necessary.  Once you have a cluster connection object, any cmdlet that needs a vserver will generally have a -vserver switch you can use then.


$cluster = connect-nccontroller <your cluster> -cred $cred
get-NCVol -Name <volname>



NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner