# merge-DominoUser.ps1
# ------------- DISCLAIMER -----------------------
# The code herein is provided as is with no gurantee or waranty concerning
# the usability or impact on your messaging system and may be used, distributed
# or modified for use provided the parties agree and acknowledge the Microsoft or
# Microsoft Partners have neither accountabilty or responsibility for results
# produced by use of this script.
# Developed by Jeff Kizner, Brad Hughes and Ed Thornburg
# -------------------------------------------------
# The script below provides the same functionality as move-dominoUser but does not enable
# the email address policy generator [RUS]. The default behavior of move-dominoUser is to
# mailbox enable the user object, apply email address policy as primary addresses and
# then add email addresses from contacts as secondary email addresses. If you intend to
# persist contact email addresses as primary email addresses of the mailbox enabled user,
# then this script is for you.
#
# The script takes a csv with header of samAccountName,InternetAddress and
# mailbox enables the user object matching the samAccountName and merging
# the contact with the matching primary smtp address.
# In this case the DisplayName is persisted as well.
#
# The minimum csv header: samAccountName,InternetAddress,displayName
#
# The script has four major sections, each of which can be run independently
# in sequence; a variable delay timer separates the major sections and is
# implementedto accomodate for directory replication latency
#
# process flow:
# add the heading for Domino directory values to be persisted to Active Directory
# note that the combinedObjectData merges the attribute data from the csv and
# the contact for the associated user into the same object and that object
# is finally exported to csv to provide the data for the enable-mailbox cmdlet
# the last part adds specific data to the mailbox enabled user
#
# -verbose provides realtime viewing of operations