Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP Cluster-mode documentation.

Cmdlet: Set-NaUserPassword


NAME
Set-NaUserPassword

SYNOPSIS
Changes the password of a specified user.

SYNTAX
Set-NaUserPassword [-User] <String> [-OldPassword] <String> [-NewPassword] <
String> [-Controller <NaController>] [-WhatIf] [-Confirm] [<CommonParameters
>]

Set-NaUserPassword [-User] <String> [-NewPassword] <String> -ChangeOther [-C
ontroller <NaController>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-NaUserPassword [-OldCredential <PSCredential>] -NewCredential <PSCredent
ial> [-Controller <NaController>] [-WhatIf] [-Confirm] [<CommonParameters>]


DESCRIPTION
Changes the password of a specified user.

Note that if the password changes for the user whose credentials are being u
sed to run this cmdlet, subsequent cmdlets will fail with an authentication
error. In this case, follow this cmdlet with another call to Connect-NaCont
roller with the new credentials.


PARAMETERS
-User <String>
The user who's password should be changed.

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

-OldPassword <String>
Current password for the user. A user with the capability 'security-pass
wd-change-others' and at least the same capabilities as the user being c
hanged, does not need to enter the current password in order to change i
t to a new one.

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

-NewPassword <String>
New password for the user. Please see documentation for constraints on t
he password.

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

-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.

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

-ChangeOther
Specify if changing another user's password. OldPassword will not be re
quired.

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

-OldCredential <PSCredential>
Old credentials for the user. The username supplied with the old creden
tial must match the username supplied with the new credential.

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

-NewCredential <PSCredential>
New credential for the user. The username supplied with the old credent
ial must match the username supplied with the new credential.

Required? true
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.Useradmin.UseradminUserInfo


NOTES


Category: useradmin
API: useradmin-user-modify-password

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

C:\PS>Set-NaUserPassword krusty s1deshowbob data4you


Change password for user 'krusty'.





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

C:\PS>Set-NaUserPassword -OldCredential bart -NewCredential bart


Change password for user 'bart'.






RELATED LINKS
Get-NaUser
New-NaUser
Remove-NaUser







 Data ONTAP® PowerShell Toolkit