Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in microsoft.metadirectoryservicesex.dll)
Usage
Visual Basic |
---|
Dim instance As IMAPasswordManagement Dim csentry As CSEntry Dim NewPassword As String instance.SetPassword(csentry, NewPassword) |
Syntax
Visual Basic |
---|
Sub SetPassword ( _ csentry As CSEntry, _ NewPassword As String _ ) |
C# |
---|
void SetPassword ( CSEntry csentry, string NewPassword ) |
C++ |
---|
void SetPassword ( CSEntry^ csentry, String^ NewPassword ) |
J# |
---|
void SetPassword ( CSEntry csentry, String NewPassword ) |
JScript |
---|
function SetPassword ( csentry : CSEntry, NewPassword : String ) |
Parameters
- csentry
-
The CSEntry object with the password to be set.
- NewPassword
-
The new password. Use the value of this parameter to set the new password.
Exceptions
Exception type | Condition |
---|---|
AccessDeniedException |
The password extension failed to set the password in the connected directory. |
ObjectTypeNotSupportedException |
The object type does not support setting or changing passwords. |
EntryPointNotImplementedException |
The rules extension does not implement this method. |
PasswordExtensionException |
The password extension throws an unknown exception. |
PasswordIllFormedException |
The supplied password contains extended characters or invalid characters. |
PasswordPolicyViolationException |
The password does not comply with the password policy. |
ServerDownException |
The connected directory extension cannot establish a connection to the connected directory. |
Remarks
Use the value of the NewPassword parameter as the new password instead of the export_password attribute of the CSEntry object. The export_password attribute might not have a value.