What is the script that will update the target SamAccountName of an Active Directory account during (NETIQKB33384)

  • 7733384
  • 02-Feb-2007
  • 25-Feb-2008

Resolution

goal
What is the script that will update the target SamAccountName of an Active Directory account during mailbox migration?

fact
Exchange Migrator 2.2 SP1 HF27949

fact
Exchange Migrator 2.2 SP1 HF34780

fact
Exchange Migrator 2.3

fix

This script will change the target Active Directory user object's pre-Microsoft Windows 2000 logon name (SamAccountName) to a value that will match the user name of the Primary-NT-Account for the source mailbox. 

  1. In the Specify Migration Options wizard select the following options
    • Yes, I would like to use scripts.
    • I will write VBScripts.
    • Include IADs pointers to objects.
  2. Select the Mailbox-Post Process option from the Event: drop-down list.
  3. Paste the entire script below into the Script: window:

'Mailbox-Post Process VBscript

name = varsetObject.getProperty("DirMigr.SourceObject.AssociatedNtAcctName")
targetIADs.put "samAccountName", name
targetIADs.setinfo



note
Exchange Migrator 2.2 SP1 Hotfix 27949 or later must be installed for this scripting property to be available.

Additional Information

Formerly known as NETIQKB33384