First, you need to add a reference to System.directoryServices name space, and locate it to "Project -> Add reference)
->. Net-> System.directoryServices.dll ", add it. Below is the code section:
Dim MyString As String = "WinNT: //". System.Security.Principal.WindowsIdentity.GetCurrent () Name.Replace ( "/", "/") 'System.Security.Principal.WindowsIdentity.GetCurrent () Name. the resulting machine is the current user name, for example: MyComputerName / AdministratorDim MyDirectoryEntry as New DirectoryEntry (MyString) MyDirectoryEntry.Invoke ( "setPassword", "newpassword") 'modify the current user's password is "newPassword" MyDirectoryEntry.CommitChanges ()