Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Changes an account password for the specified SharePoint site.
Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
Public Shared Sub ChangeAccountPassword ( _
    web As SPWeb, _
    loginName As String, _
    oldPassword As String, _
    newPassword As String _
)
'Usage
Dim web As SPWeb
Dim loginName As String
Dim oldPassword As String
Dim newPassword As StringSPUtility.ChangeAccountPassword(web, _
    loginName, oldPassword, newPassword)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public static void ChangeAccountPassword(
    SPWeb web,
    string loginName,
    string oldPassword,
    string newPassword
)
Parameters
web
Type: Microsoft.SharePoint.SPWebAn Microsoft.SharePoint.SPWeb object that represents the site.
loginName
Type: System.StringA string that contains the user name of the user.
oldPassword
Type: System.StringA string that contains the old password.
newPassword
Type: System.StringA string that contains the new password.