|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: Connect-NcController
NAME
Connect-NcController
SYNOPSIS
Connect to a clustered Data ONTAP controller.
SYNTAX
Connect-NcController [-Name] <String[]> [-Port <UInt16>] [-Credential <PSCre
dential>] [-HTTPS] [-HTTP] [-Transient] [-Vserver <String>] [-Timeout <Int32
>] [-Add] [<CommonParameters>]
DESCRIPTION
Establish a connection to a clustered Data ONTAP storage controller.
Unless 'Transient' is true, this connection is saved in the global variable
CurrentNcController. All other clustered ONTAP cmdlets in the Data ONTAP Po
werShell Toolkit utilize this global variable if their 'Controller' paramete
r is not explicitly provided. The clustered Data ONTAP Toolkit is capable o
f storing multiple connections in CurrentNcController; use the -Add paramete
r to use that feature.
Connections are established using HTTPS by default with automatic fallback t
o HTTP. Supply the Credential parameter (see examples) or save credentials
in the Toolkit credentials cache.
Use the HTTP/HTTPS parameters to limit connections to a specific protocol.
Use the Vserver parameter to initiate a connection to a vserver 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.
Required? false
Position? named
Default value
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.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-HTTPS
This cmdlet always tries to establish a secure HTTPS connection to the s
torage controller, but it will fall back to HTTP if necessary. Specify
-HTTPS to fail the connection attempt in that case rather than fall back
to HTTP.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-HTTP
This cmdlet always tries to establish a secure HTTPS connection to the s
torage controller, but it will fall back to HTTP if necessary. Specify
-HTTP to skip the HTTPS connection attempt and only try HTTP.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Transient
Specify to prevent setting the global variable CurrentNcController.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Vserver <String>
If connecting to a cluster LIF, use this parameter to tunnel commands to
a vserver.
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Timeout <Int32>
Connection timeout in milliseconds.
Required? false
Position? named
Default value 60000
Accept pipeline input? false
Accept wildcard characters? false
-Add
Specify to add this connection to the global variable CurrentNcControlle
r instead of replacing the value in the variable.
Required? false
Position? named
Default value
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.C.NcController
NOTES
Category: toolkit
Family: cluster, vserver
-------------- Example 1 --------------
C:\PS>Connect-NcController 10.61.172.155
Connect to a clustered ONTAP controller using HTTPS. In this example, the c
redentials are assumed to come from the Toolkit's credentials cache.
In this example, the address is that of a cluster admin Vserver.
Ontapi : 1.15
Vserver :
Mode : Cluster
OntapiMajorVersion : 1
OntapiMinorVersion : 15
Version : NetApp Release RollingRock__8.1.0 Cluster-Mode: Mon May
09 06:25:48 PDT 2011
Protocol : HTTPS
Proxy :
TimeoutMsec : 10000
Name : 10.61.172.155
Address : 10.61.172.155
Port : 443
Credentials : System.Net.NetworkCredential
ValidateIncoming : False
ValidateOutgoing : False
Trace : False
-------------- Example 2 --------------
C:\PS>Connect-NcController 10.61.172.155 -Credential admin -Vserver vserver1
Connect to controller '10.61.172.155' using HTTPS/HTTP. PowerShell will pro
mpt for admin credentials.
In this example, the address is that of a cluster admin vserver but a data v
server is also specified. This causes the connection to be made to the clus
ter admin vserver, but all subsequent cmdlets that are only supported by a d
ata vserver are directed to vserver 'vserver1'.
Ontapi : 1.15
Vserver : vserver1
Mode : Cluster
MaxIterRecords : 100
OntapiMajorVersion : 1
OntapiMinorVersion : 15
Version : NetApp Release RollingRock__8.1.0 Cluster-Mode: Tue Aug
23 05:34:04 PDT 2011
Protocol : HTTPS
Proxy :
TimeoutMsec : 60000
Name : 10.61.172.155
Address : 10.61.172.155
Port : 443
Credentials : NetApp.Ontapi.OntapiCredential
ValidateIncoming : False
ValidateOutgoing : False
Trace : False
-------------- Example 3 --------------
C:\PS>Connect-NcController 10.60.189.142
Connect to a management LIF on a data vserver. While directly connected to
a data vserver, cmdlets may not be directed to the cluster admin vserver or
any other data vserver.
Ontapi : 1.15
Vserver : costea01
Mode : Cluster
MaxIterRecords : 100
OntapiMajorVersion : 1
OntapiMinorVersion : 15
Version : NetApp Release 8.1RC2 Cluster-Mode: Thu Oct 27 19:21:18
PDT 2011
Protocol : HTTPS
Proxy :
TimeoutMsec : 60000
Name : 10.60.189.142
Address : 10.60.189.142
Port : 443
Credentials : NetApp.Ontapi.OntapiCredential
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 "admin",$password
Connect-NcController 10.61.172.155 -Credential $cred
Connect to controller '10.61.172.155' using HTTP/HTTPS but suppress the cred
ential prompt by creating a PSCredential object programmatically.
Ontapi : 1.15
Vserver :
Mode : Cluster
OntapiMajorVersion : 1
OntapiMinorVersion : 15
Version : NetApp Release RollingRock__8.1.0 Cluster-Mode: Mon May
09 06:25:48 PDT 2011
Protocol : HTTPS
Proxy :
TimeoutMsec : 10000
Name : 10.61.172.155
Address : 10.61.172.155
Port : 443
Credentials : System.Net.NetworkCredential
ValidateIncoming : False
ValidateOutgoing : False
Trace : False
-------------- Example 5 --------------
C:\PS>Connect-NcController 10.61.172.155 -Vserver vserver1
Connect-NcController 10.61.172.155 -Vserver vserver2 -Add
Get-NcVol | select NcController, Vserver, Name | ft -AutoSize
Connect to two vserver contexts and get the volume list from both.
NcController Vserver Name
------------ ------- ----
10.61.172.155 vserver1 georgeVol1
10.61.172.155 vserver1 vol1
10.61.172.155 vserver1 vserver1vol0
10.61.172.155 vserver2 vserver2vol0
RELATED LINKS
Find-NcController
| Copyright © 2012 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|