Easy and Useful PoweShell Commands used for Exchange Server 2010

Have you ever wondered how to make your life as a Network or Exchange Administrator a lot easier by using the PowerShell commands in your Exchange Server 2010? Some tasks can be daunting so I have compiled some easy to follow commands. I have actually been using all of these.

Note:  Mailbox Database, User, domain.com, usermail.com are just examples that I used and all fictitious, you may replace them with appropriate database name, domain, User and email.

Some common tasks that the Exchange Server 2010 System Manager was used for was exporting lists of mailbox users into CSV format for reporting in Excel, knowing the Statistics of Users Mailboxes and Whitelisting.

Export output of Mailbox Users in CSV format, and then open it up in Excel.

Get-MailboxDatabase “Mailbox Database” | Get-MailboxStatistics | Sort totalitemsize -desc | Export-CSV C:\mailboxes.csv

Statistics of all Users mailboxes in a particular database.

Get-MailboxDatabase “Mailbox Database” | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount

Statistics of a particular User

Get-MailboxStatistics User | ft DisplayName, TotalItemSize, ItemCount

Whitelisting Domain

Set-ContentFilterConfig -BypassedSenderDomains the domain.com

Whitelisting a Specific Email

Set-ContentFilterConfig -BypassedSenderDomains the useremail.com

Goodbye SBS and Welcome Windows Server 2012 Essentials

It’s the end of the road for SBS and Microsoft introduces a much better cloud-enabled server platform solution and a more flexible product – Windows Small Business Server Essentials has been renamed Windows Server 2012 Essentials. SBS will disappear in a year after its milestone but will still be sold until June 2013, Dec 2013, and >5 years depending on the licensing models. Essentials 2012 is part of the Windows Server 2012 family which comes in four different versions – Foundation, Essentials, Standard, and Data Center all have major draw to the cloud. Windows Server Essentials will only support up to 25 Users. If you need more licensing Windows Server 2012 Standard is doable. Also, if you are looking to  implement virtualization Essentials 2012 has no virtualization rights.

Don’t be surprised if there will be frustrations among the Small Business Consultants and Consumers when SBS departs,  it might be a tough transition for them to move to Essentials 2012.

The main focus here is the email flexibility on the Essentials 2012, Consultants and Customers will have their option whether they wanted their email on-premises, hosted or cloud.

Download Windows Server 2012 Essentials Beta: http://www.microsoft.com/en-us/download/details.aspx?id=30327

Windows Server 2012 Essentials FAQ (PDF) – Microsoft

Using SMTP Relay in Exchange Server 2007 and 2010

What is Simple Mail Transfer Protocol (SMTP) Relay?  SMTP Relay will bypass your ISP’s email outbound restrictions.

Scenario:  You are running Exchange Server 2010, everything seems to be going well – and then one day all employees within company.com domain cannot send out any emails.  You have checked the Event Viewer and can’t find any relevant critical errors in Event IDs pertaining to the issue. You have verified that SMTP Ports are opened up in your Security or Firewall Device, so what could it be?

This has been a common issue if your company is hosting Exchange Server, there are times that for any reasons your ISP could be blocking SMTP Ports. The workaround is to find a reliable SMTP Relay Provider, make sure that the Provider has a redundancy backup just in case the primary SMTP Relay server goes down.  Based on my actual experience dealing with this type of setup, it really works and they are very reasonable too. Rest assured that your email will go out 24/7.

Verify if your ISP is blocking the outgoing SMTP port by running these DOS command:

c:\> telnet relayprovider.com 25

You may also try Port 26, 940, 8001, 2525, 80 by using the same telnet command  instead of  Port 25. If the connection gets responses from the alternative SMTP port, you should use that port instead of Port 25 when setting up Smart Hosting.

How to configure the SMTP Relay?

Open up Exchange Management Console (EMC)>Organization Configuration>Hub Transport>New Send Connector

You may follow the guide from your SMTP Relay Provider’s website to complete the process of setting up SMTP Relay.