|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: Add-NaCredential
NAME
Add-NaCredential
SYNOPSIS
Save login credentials for a Data ONTAP controller.
SYNTAX
Add-NaCredential [-Credential <PSCredential>] [-SystemScope] [<CommonParamet
ers>]
Add-NaCredential -Controller <NaController> [-Credential <PSCredential>] [-S
ystemScope] [<CommonParameters>]
Add-NaCredential [-Name] <String> [-Credential <PSCredential>] [-SystemScope
] [<CommonParameters>]
DESCRIPTION
Save login credentials for a Data ONTAP controller. The cached credentials
are available to Connect-NaController and Invoke-NaSsh, making these cmdlets
as simple to use with HTTP/HTTPS connections as when using RPC connections.
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 NaController objec
t, or by the value in $global:CurrentNaController.
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 NaController object is specified and has val
id credentials, those are used. Finally, if the $global:CurrentNaContro
ller contains an instance of NaController with valid credentials, 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
-Controller <NaController>
An NaController object, as returned by Connect-NaController. If neither
this parameter nor -Name is specified, this cmdlet will use the value i
n $global:CurrentNaController (if set).
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Name <String>
The name or address of a storage controller. If a host name is specifie
d, it must be resolvable to an address. If neither this parameter nor -
Controller is specified, this cmdlet will use the value in $global:Curre
ntNaController (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.PowerShell.SDK.Cmdlets.Toolkit.Credentials.NaCredential
NOTES
Category: toolkit
-------------- Example 1 --------------
C:\PS>Add-NaCredential dunn -Credential root
Add root credentials for controller 'dunn'.
Name : dunn
Credential : System.Management.Automation.PSCredential
HostUser : RTPRRE\Administrator
-------------- Example 2 --------------
C:\PS>Connect-NaController benson -Credential (Get-Credential)
Add-NaCredential
Name : benson
Credential : System.Management.Automation.PSCredential
HostUser : RTPRRE\Administrator
Add the credential of the currently connected controller (stored in $global:
CurrentNaController) to the credentials cache.
RELATED LINKS
Get-NaCredential
Remove-NaCredential
Connect-NaController
Invoke-NaSsh
| Copyright © 2013 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|