Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Login.ChangePassword Method (String, Boolean, Boolean)

Changes the password for the login account.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
public void ChangePassword(
	string newPassword,
	bool unlock,
	bool mustChange
)

Parameters

newPassword
Type: System.String
A String value that specifies the new password.
unlock
Type: System.Boolean
A Boolean value that specifies whether to unlock the login account's access to the instance of SQL Server.If True, the login account is given access to the instance of SQL Server.If False, the login account remains locked out of the instance of SQL Server.
mustChange
Type: System.Boolean
A Boolean value that specifies whether the login account must change the password.If True, the password must be changed again.If False, the password will not need to be changed.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.