Data ONTAP® PowerShell Toolkit

Cmdlet: Connect-NaController


NAME
Connect-NaController

SYNOPSIS
Establish a connection to a DataONTAP storage controller.

SYNTAX
Connect-NaController [-Name] <String> [-Transient] [-Vfiler <String>] [-Warn
ingAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters
>]

Connect-NaController [-Name] <String> [-Port <UInt16>] -Credential <PSCreden
tial> [-ForceSecure] [-ForceUnsecure] [-Transient] [-Vfiler <String>] [-Warn
ingAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters
>]


DESCRIPTION
Establish a connection to a DataONTAP storage controller. Unless 'Transient
' is true, this connection is saved in the global variable CurrentNaControll
er. All other cmdlets in the DataONTAP PowerShell SDK utilize this global v
ariable 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). Othe
r parameters are available to force either HTTP or HTTPS.

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)
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 (ByValue)
Accept wildcard characters? false

-WarningAction <ActionPreference>


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

-WarningVariable <String>


Required? false
Position? named
Default value
Accept pipeline input? false
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
use HTTP/HTTPS instead of RPC.

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

-ForceSecure
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. Set this value to 'true' to fail the connection attempt r
ather than fall back to HTTP.

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

-ForceUnsecure
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. Set this value to 'true' to skip the HTTPS connection att
empt and use only HTTP.

Required? false
Position? named
Default value false
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.60


Connect to controller at address '10.61.167.60' using RPC.


Protocol : RPC
Vfiler :
Name : 10.61.167.60
Address : 10.61.167.60
Port : 443
Credentials :
ForceUseUnsecure : False
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.


Protocol : HTTPS
Vfiler :
Name : dunn
Address : 10.61.167.60
Port : 443
Credentials : System.Net.NetworkCredential
ForceUseUnsecure : False
ValidateIncoming : False
ValidateOutgoing : False
Trace : False


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

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


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


Protocol : RPC
Vfiler : vfiler1
Name : dunn
Address : 10.61.167.60
Port : 443
Credentials :
ForceUseUnsecure : False
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.


OntapiMajorVersion : 1
OntapiMinorVersion : 9
Protocol : HTTPS
Vfiler :
Name : benson
Address : 10.61.167.61
Port : 443
Credentials : System.Net.NetworkCredential
ForceUseUnsecure : False
ValidateIncoming : False
ValidateOutgoing : False
Trace : False



RELATED LINKS







 Data ONTAP® PowerShell Toolkit