Set-LXCAUserAccountPassword
This cmdlet modifies the password for an existing user account on the Lenovo XClarity Administrator server.
Modifying the password of user account other than the currently logged in user is the same as resetting that user’s password (without checking that user’s password).
To modify other properties for an existing user account, use the Set-LXCAUserAccount cmdlet.
Note
You cannot pipe objects to this cmdlet.
Syntax
Set-LXCAUserAccountPassword [-Connection Connection]
-CurrentPassword SecureString
-NewPassword SecureString
-ConfirmPassword SecureString
[CommonParameter]
Set-LXCAUserAccountPassword [-Connection Connection]
-Host String
[-Port Int]
[-Proxy WebProxy]
-UserName String
-CurrentPassword SecureString
-NewPassword SecureString
-ConfirmPassword SecureString
[CommonParameter]
Parameters
- -Connection LXCAConnection
- Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
- -Host String
- Specifies the HTTPS address (IP address or hostname) of the XClarity Administrator server.
- -Port Int
- Specifies the port on the XClarity Administrator server to be used for the connection. The default is 443.
- -Proxy WebProxy
- Specifies a Web service proxy object that includes proxy connection and authentication information.
- -UserName String
- Specifies the ID for the user account to be modified.
- -CurrentPassword SecureString
- Specifies the current password.
- -NewPassword SecureString
- Specifies the new password.
- -ConfirmPassword SecureString
- Confirms the new password.
- CommonParameters
- This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.
Results
This cmdlets modifies the password for the user account. No object is returned.
Examples
The following example modifies the password for a currently authenticated user.
cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Port 443 -Credential $cred
$Password = ConvertTo-SecureString "curpwd" -AsPlainText -Force
$NewPassword = ConvertTo-SecureString "newpwd" -AsPlainText -Force
$ConfirmPassword = ConvertTo-SecureString "newpwd" -AsPlainText -Force
Set-LXCAUserAccountPassword -CurrentPassword $Password -NewPassword $NewPassword`
-ConfirmPassword $ConfirmPassword
Disconnect-LXCAThe following example illustrates how to use this cmdlet to modify the password for a user that is not currently authenticated with the XClarity Administrator server.
$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred
$Password = ConvertTo-SecureString "curpwd" -AsPlainText -Force
$NewPassword = ConvertTo-SecureString "newpwd" -AsPlainText -Force
$ConfirmPassword = ConvertTo-SecureString "newpwd" -AsPlainText -Force
Set-LXCAUserAccountPassword -Host 192.0.2.0 -UserName "userid" -CurrentPassword $Password`
-NewPassword $NewPassword -ConfirmPassword $ConfirmPassword
Disconnect-LXCA
Related links
Give documentation feedback