Wednesday, May 22, 2013

Get-DistributionGroupMember

1. Get-DistributionGroupMember from a regular DL
 
Get-DistributionGroupMember -identity "mydl" | Export-Csv C:\MyFile.Csv
 
Where mydl is our distribution group, and myfile.csv is the resulting CSV file.
 
2. Get-DistributionGroupMember from a Dynamic DL
 
$members = Get-DynamicDistributionGroup -Identity "dynamicgroupname"
 
Get-Recipient -RecipientPreviewFilter $members.RecipientFilter > C:\MyDDLmembersall.txt

 

How to create or remove ForeignConnector Exchange 2010

After migrating from Exchange 2007 to Exchange 2010, we are in process of decommiossion of Exchange 2007. Since we have AccuRoute Fax, so we need to change Fax ForeignConnector from Exchange 2007 Hub to Exchange 2010 Hub.
 
Here is the cmdlet we used for the migration,
 
Remove-ForeignConnector "AccuRoute Fax Connector"
New-Foreignconnector "AccuRoute Fax 10 Connector" -AddressSpaces "FAX:*;1" -SourceTransportServers "hub10-1","hub10-2", "Hub10-3"
Set-Foreignconnector -Identity "AccuRoute Fax 10 Connector" -Maxmessagesize 20Mb -dropdirectory "file://fax-10/Drop$"
 
If you need the connected be scoped for local AD site, the following cmdlet need to be run:
 
Set-Foreignconnector -Identity  "AccuRoute Fax 10 Connector" -Isscopedconnector true$
 

Wednesday, May 1, 2013

Email Routing Using Exchange Cost for Multiple AD Sites In Exchange 2010

Exchange 2010 uses AD Sites and Services information to route emails from one AD site to another. All site links will have a default AD cost of 100. Smaller companies might leave the configuration as it is, as they will only have a single site in most cases.
 
Larger organizations will have fairly good number of AD sites and the AD site links will be configured with the appropriate AD cost for the links. By default, Exchange 2010 uses the link which has the least AD cost to send emails from one AD site to another. You may come across organizations where the AD costs will have to be altered for an efficient email routing, but you won't be given the go ahead. This mostly happens in large organizations, as changing the existing AD site costs may affect the production network or the AD team just don't want to make any changes.
Exchange 2010 (actually 2007 as well) has a solution for the above scenario. There is a way by which you can change the email routing without making any changes to the AD site link costs. It is known as "Exchange Cost" and is not configured by default.
Once an exchange cost for a site link is specified, it overrides the AD link costs for email routing.  By going so, it only overrides the email routing topology.
 
Set-ADSiteLink –identity "link name" –ExchangeCost "cost"
The maximum message size that passes through a site link can be restricted as well. It will come in handy if the link between the site is not great. Run the command below to specify a size limit for communications between various AD sites.
Set-ADSiteLink –identity "link name" –MaxMessageSize "size"