Creating Active Directory Management Console Plugin for Clearing a
User’s Target Address
Open up ADSI edit and go to the following location.
CN=user-Display,CN=409,CN=DisplaySpecifiers,CN=Configuration,DC=<domain>,DC=<domain>
Look for the
'AdminContextMenu'
Add the following information...
2, Clear TargetAddress,
"\\domain\netlogon\scripts\myscript.vbs"
VBScript - This script will clear the TargetAddress of Any user.
Const
ADS_PROPERTY_CLEAR = 1
Set wshArguments = WScript.Arguments
Set objUser = GetObject(wshArguments(0))
Set fso =
CreateObject("Scripting.FileSystemObject")
Set objShell =
WScript.CreateObject("WScript.Shell")
'msgbox ("Target Address is.." &
objUser.TargetAddress)
objUser.PutEx ADS_PROPERTY_CLEAR,
"TargetAddress", 0
objUser.SetInfo
msgbox ("Target Address is cleared. Refresh AD
console")
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.