Disclaimer: We hope that the information on these pages is valuable to you.
Your use of the information contained in these pages, however, is at your sole risk.
All information on these pages is provided "as -is", without any warranty, whether express or implied,
of its accuracy, completeness, fitness for a particular purpose, title or non-infringement,
and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by site owners or operators.
Further, the site owners and operators shall not be liable for any damages you may sustain by using this information,
whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.
Warning: main(/home/prosphot/public_html/smog/track/write_logs.php) [function.main]: failed to open stream: No such file or directory in /home/prosphot/public_html/blog/skins/leaf/footer.php on line 3
Warning: main(/home/prosphot/public_html/smog/track/write_logs.php) [function.main]: failed to open stream: No such file or directory in /home/prosphot/public_html/blog/skins/leaf/footer.php on line 3
Warning: main() [function.include]: Failed opening '/home/prosphot/public_html/smog/track/write_logs.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/prosphot/public_html/blog/skins/leaf/footer.php on line 3
Thu 04.10.08: Script to copy all contacts from one Organization to Another
We have two forests, and are moving from Exchange 2003 in one forest to Exchange 2007 in another forest.This script will query a DC for all the mail enabled contacts on that DC, and then create the same contacts in the current forest.
Usage: ./copy_contacts [Domain Controller of Source Organization]
Example: ./copy_contacts pr-dc3
param($server)
write-host "Getting list of Contacts on $Server"
$ContactList = Get-MailContact -DomainController $server
foreach ($sc in $ContactList) {
write-host "Creating Contact "$sc.Displayname
$sc_name = Get-contact -DomainController $server -Identity $sc.DisplayName
new-MailContact -ExternalEmailAddress $sc.ExternalEmailAddress -Alias $sc.Alias -DisplayName $sc.DisplayName -Name $sc.Name -OrganizationalUnit "myfamily.int/Contacts" -Firstname $sc_name.FirstName -LastName $sc_name.Lastname -Initials $sc_name.Initials
set-MailContact -Identity $sc.DisplayName -EmailAddresses $sc.EmailAddresses
}
Item Rating Information....