为什么你们不看msdn呢,这是上面关于操作ad用户密码的文章。Example Code for Setting User PasswordsThe following Visual Basic® code example shows how to set a user password, assuming the caller has the permission to set the password.Dim oADsSysInfo as New ADSystemInfo
Dim sPass as String
Dim ADsPath as String' Retrieve the ADsPath for the current user
ADsPath = oADsSysInfo.UserName' Use some method of securely getting and verifying
' the new password from the user.
SetPassword (ADsPath, sPass)Exit SubSub SetPassword(sADsPath as String, sPassword as String)
Set usr = GetObject(sADsPath)
oObject.SetPassword sPassword
End Sub
Dim sPass as String
Dim ADsPath as String' Retrieve the ADsPath for the current user
ADsPath = oADsSysInfo.UserName' Use some method of securely getting and verifying
' the new password from the user.
SetPassword (ADsPath, sPass)Exit SubSub SetPassword(sADsPath as String, sPassword as String)
Set usr = GetObject(sADsPath)
oObject.SetPassword sPassword
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货