Data ONTAP® PowerShell Toolkit

Switch to clustered Data ONTAP documentation.

Cmdlet: Connect-NaController


NAME
Connect-NaController

SYNOPSIS
Establish a connection to a Data ONTAP storage controller.

SYNTAX
Connect-NaController [-Name] <String> [-Port <UInt16>] [-Credential <PSCrede
ntial>] [-HTTPS] [-HTTP] [-RPC] [-Transient] [-Vfiler <String>] [-Timeout <I
nt32>] [<CommonParameters>]


DESCRIPTION
Establish a connection to a Data ONTAP storage controller. Unless 'Transien
t' is true, this connection is saved in the global variable CurrentNaControl
ler. All other cmdlets in the Data ONTAP PowerShell Toolkit utilize this gl
obal variable if their 'Controller' parameter is not explicitly provided.

Connections are established using RPC by default. To use HTTPS (with automa
tic fallback to HTTP), supply the Credential parameter (see examples) or sav
e credentials in the Toolkit credentials cache.

Use the RPC/HTTP/HTTPS parameters to limit connections to a specific protoco
l.

Use the Vfiler parameter to initiate a connection to a vfiler context.


PARAMETERS
-Name <String>
The name of the storage controller. This value may also be a string rep
resentation of an IP address. If not an address, the name must be resol
vable to an address.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Port <UInt16>
The port on which to connect to the storage controller. If not set, it
defaults to 80 for HTTP and 443 for HTTPS. This parameter only applies
to HTTP/HTTPS protocols.

Required? false
Position? named
Default value 80/443
Accept pipeline input? false
Accept wildcard characters? false

-Credential <PSCredential>
A System.Management.Automation.PSCredential object containing the creden
tials needed to log into the storage controller. Specify this value to
default to using HTTP/HTTPS instead of RPC.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-HTTPS
When using HTTP/HTTPS, this cmdlet always tries to establish a secure HT
TPS connection to the storage controller, but it will fall back to HTTP
if necessary. Specify -HTTPS to fail the connection attempt in that cas
e rather than fall back to HTTP.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HTTP
When using HTTP/HTTPS, this cmdlet always tries to establish a secure HT
TPS connection to the storage controller, but it will fall back to HTTP
if necessary. Specify -HTTP to skip the HTTPS connection attempt and on
ly try HTTP.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-RPC
Specify -RPC to limit the connection protocol to RPC, even if valid cred
entials are available.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Transient
Set to true to prevent setting the global variable CurrentNaController.

Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false

-Vfiler <String>
Name of vfiler to tunnel commands to. If not specified, all commands ar
e sent to the physical filer.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Timeout <Int32>
Connection timeout in milliseconds. Only applies to HTTP/HTTPS connecti
ons.

Required? false
Position? named
Default value 60000
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
NetApp.Ontapi.Filer.NaController


NOTES


Category: toolkit

-------------- Example 1 --------------

C:\PS>Connect-NaController 10.61.167.61


Connect to controller at address '10.61.167.61' using RPC.


Ontapi : 1.12
OntapiMajorVersion : 1
OntapiMinorVersion : 12
Version : NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010
Protocol : RPC
Proxy :
TimeoutMsec : 10000
Vfiler :
Name : 10.61.167.61
Address : 10.61.167.61
Port : 0
Credentials :
ValidateIncoming : False
ValidateOutgoing : False
Trace : False


-------------- Example 2 --------------

C:\PS>Connect-NaController dunn -Credential (Get-Credential)


Connect to controller 'dunn' using HTTPS/HTTP. PowerShell will prompt for c
redentials.


Ontapi : 1.12
OntapiMajorVersion : 1
OntapiMinorVersion : 12
Version : NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010
Protocol : HTTPS
Proxy :
TimeoutMsec : 10000
Vfiler :
Name : dunn
Address : 10.61.167.60
Port : 443
Credentials : System.Net.NetworkCredential
ValidateIncoming : False
ValidateOutgoing : False
Trace : False


-------------- Example 3 --------------

C:\PS>Connect-NaController dunn -Vfiler vfiler1


Connect to vfiler 'vfiler1' on controller 'dunn' using RPC.


Ontapi : 1.12
OntapiMajorVersion : 1
OntapiMinorVersion : 12
Version : NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010
Protocol : RPC
Proxy :
TimeoutMsec : 10000
Vfiler : vfiler1
Name : dunn
Address : 10.61.167.60
Port : 0
Credentials :
ValidateIncoming : False
ValidateOutgoing : False
Trace : False


-------------- Example 4 --------------

C:\PS>$password = ConvertTo-SecureString "p@ssword" -AsPlainText –Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -Argu
mentList "root",$password
Connect-NaController benson -Credential $cred


Connect to controller 'benson' using HTTP/HTTPS but suppress the credential
prompt by creating a PSCredential object programmatically.


Ontapi : 1.12
OntapiMajorVersion : 1
OntapiMinorVersion : 12
Version : NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010
Protocol : HTTPS
Proxy :
TimeoutMsec : 10000
Vfiler :
Name : benson
Address : 10.61.167.61
Port : 443
Credentials : System.Net.NetworkCredential
ValidateIncoming : False
ValidateOutgoing : False
Trace : False



RELATED LINKS
Find-NaController
Initialize-NaController
Add-NaCredential







 Data ONTAP® PowerShell Toolkit