Archive

Articles taggués ‘Contacts’

Modifier les adresses de MailContacts.

Modifier le domaine de l’adresse externe sur tous les MailContacts d’un OU.

?View Code POWERSHELL
$nldomcontact = Get-MailContact -OrganizationalUnit "domain.local/NL" -ResultSize unlimited | Where-Object { $_.ExternalEmailAddress -match "@domino.domain.com" }
foreach ($contact in $nldomcontact){
$extsmtp = "SMTP:" + $contact.alias + "@nl.domain.com"
Set-MailContact -Identity $contact -ExternalEmailAddress $extsmtp
}
Categories: Exchange 2007 Tags:

Exporter les MailContacts.

Export des MailContacts.

?View Code POWERSHELL
 
$resfile = New-Item -ItemType file -Path liste_external_contacts.csv -Force
 
Add-Content -Path $resfile -Value "MailContactDisplayName,MailcontactAlias,MailcontactOrganizationalUnit,MailcontactExternalEmailAddress"
 
Get-MailContact -ResultSize unlimited | ForEach-Object {
 
	Add-Content -Path $resfile -Value "$($_.DisplayName),$($_.alias),$($_.OrganizationalUnit),$($_.ExternalEmailAddress)"
 
}
Categories: Exchange 2007 Tags: ,

Exporter les boites avec forwards.

Export des boites aux lettres qui ont des forwards actifs.

?View Code POWERSHELL
$resfile = New-Item -ItemType file -Path liste_forwards.csv -Force
 
Add-Content -Path $resfile -Value "MailboxDisplayName,MailboxAlias,MailContactDisplayName,MailcontactOrganizationalUnit,MailcontactExternalEmailAddress"
 
 
get-mailbox -ResultSize unlimited | Where-Object { $_.ForwardingAddress -ne $null } | ForEach-Object { 
$forward = Get-Recipient -Identity $_.ForwardingAddress
	if ( $forward.RecipientType -eq "MailContact") {
	$mailc = Get-MailContact -Identity $forward.alias
	Add-Content -Path $resfile -Value "$($_.name),$($_.alias),$($mailc.displayname),$($mailc.OrganizationalUnit),$($mailc.ExternalEmailAddress)"
	}
	else {}
 
}

Mettre en place un forward sur un BAL.

Mettre en place une redirection sur une boite aux lettre.

?View Code POWERSHELL
Set-Mailbox -Indentity utilisateur@internal.com -DeliveryToMailboxAndForward:$false -ForwardingAddress utilisateur@forward.com

Mettre $true si vous souhaitez conserver une copie des messages dans la boite aux lettre d’origine.

Categories: Exchange 2007 Tags: ,