|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: Add-NcCredential
NAME
Add-NcCredential
SYNOPSIS
Save login credentials for a clustered Data ONTAP controller.
SYNTAX
Add-NcCredential [-Credential <PSCredential>] [-SystemScope] [-WhatIf] [-Con
firm] [<CommonParameters>]
Add-NcCredential -Controller <NcController[]> [-Credential <PSCredential>] [
-SystemScope] [-WhatIf] [-Confirm] [<CommonParameters>]
Add-NcCredential [-Name] <String> [-Credential <PSCredential>] [-SystemScope
] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Save login credentials for a clustered Data ONTAP controller. The cached cr
edentials are available to Connect-NcController, Invoke-NaSsh, and other Too
lkit cmdlets.
The saved credentials are encrypted for safe storage. By default, a set of
credentials is saved using the current user context, so that only the same W
indows user can retrieve them. If an application of the Toolkit must utiliz
e the cached credentials while running under some other context, specify the
-SystemScope parameter. This saves the credentials such that any process o
r user on the local system can access them, so this option should only be us
ed on a system with limited user access.
Any number of Toolkit users may store credentials for a given storage contro
ller in the cache, but a user will only be able to see and utilize credentia
ls saved using his account identity or the system identity.
The credentials cache is designed to be interoperable with that created by t
he PowerShell cmdlets bundled with NetApp's ApplianceWatch PRO 2.1 and later
. However, the AppWatch cmdlets only support saving credentials with System
scope, so be sure to use the -SystemScope parameter with Data ONTAP PowerSh
ell Toolkit credential cmdlets if interoperability is important.
The controller may be specified by name or address, by an NcController objec
t, or by the value(s) in $global:CurrentNcController.
PARAMETERS
-Credential <PSCredential>
A System.Management.Automation.PSCredential object containing the creden
tials needed to log into a storage controller. If specified, this value
is used. Otherwise, if an NcController object is specified and has val
id credentials, those are used. Finally, if the $global:CurrentNcContro
ller contains one or more instances of NcController with valid credentia
ls, those are used.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SystemScope
Specify to save the credentials such that any process or user on the loc
al system can access them. This option should only be used on a system
with limited user access.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Controller <NcController[]>
A clustered Data ONTAP controller to receive this cmdlet, as embodied by
an NcController object. This parameter is returned by the Connect-NcCo
ntroller cmdlet. If not specified, the value in the global variable Cur
rentNcController is used. In the latter case, if CurrentNcController co
ntains a collection of NcController objects, this cmdlet is invoked on e
ach controller in succession.
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Name <String>
The name or address of a clustered ONTAP storage controller. If a host
name is specified, it must be resolvable to an address. If neither this
parameter nor -Controller is specified, this cmdlet will use the value(
s) in $global:CurrentNcController (if set).
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
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
DataONTAP.C.PowerShell.SDK.Cmdlets.Toolkit.Credentials.NcCredential
NOTES
Category: toolkit
-------------- Example 1 --------------
C:\PS>Connect-NcController 10.61.172.155
Add-NcCredential
Connect to a controller and add it to the credentials cache.
Name Credential HostUser
---- ---------- --------
10.61.172.155 System.Management.Automation.PSCredential RTPRRE\Administrator
RELATED LINKS
Get-NcCredential
Remove-NcCredential
| Copyright © 2012 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|