次の方法で共有


UserIdentity.ChangePassword Method (String, SecureString, SecureString)

 

Changes the password for the specified user account.

Namespace:   Microsoft.WindowsServerSolutions.Users
Assembly:  UserObjectModel (in UserObjectModel.dll)

Syntax

public static void ChangePassword(
    string userName,
    SecureString oldPassword,
    SecureString newPassword
)
public:
static void ChangePassword(
    String^ userName,
    SecureString^ oldPassword,
    SecureString^ newPassword
)
Public Shared Sub ChangePassword (
    userName As String,
    oldPassword As SecureString,
    newPassword As SecureString
)

Parameters

  • userName
    Type: System.String

    The name of the user account for which the password is changed.

Exceptions

Exception Condition
UserException

The user account is not valid.

See Also

UserIdentity Class
Microsoft.WindowsServerSolutions.Users Namespace

Return to top