Archive - September, 2009

Task – Get A List Of Mailboxes That Was Created In The Last One Week…

I had to get a list of mailboxes that was created in the last one week. Though it is quite easy, I thought that I will share it anyway.

Get-Mailbox | Where-Object {$_.WhenCreated –ge ((Get-Date).Adddays(-7))}

The above command will give you a list of all mailboxes that was created in the last one week, but may not bring the properties that you are looking for. Modify the command with the values you need. For example,

Get-Mailbox | Where-Object {$_.WhenCreated –ge ((Get-Date).Adddays(-7))} | ft name, servername, database

You can export the result to a txt or csv file.

Get-Mailbox | Where-Object {$_.WhenCreated –ge ((Get-Date).Adddays(-7))} | ft name, servername, database | Out-File C:mailboxes.txt

Get-Mailbox | Where-Object {$_.WhenCreated –ge ((Get-Date).Adddays(-7))} | ft name, servername, database | Export-CSV c:mailboxes.csv

It is easy to extend the command to find a list of mailboxes that was created in the last one month. For the month of August, run

Get-Mailbox | Where-Object {($_.WhenCreated).Month –eq 8} | ft name, servername, database

Note that the value of month takes an integer.

Piping the above command to Meaure-Object will give you the number of mailboxes that was created.

Get-Mailbox | Where-Object {($_.WhenCreated).Month –eq 8} | Measure-Object

To get the list for the year 2009, run

Get-Mailbox | Where-Object {($_.WhenCreated).Year –eq 2009} | ft name, servername, database

Free Antivirus From Microsoft – Security Essentials…

Microsoft has released a FREE antivirus solution for home PCs – Microsoft Security Essentials. It provides real-time protection for your home PC that guards against viruses, spyware, and other malicious software. The software supports Windows XP SP2+, Vista and 7.

Security Essentials is a free download from Microsoft that is simple to install, easy to use and always kept up to date so you can be assured your PC is protected by the latest technology. Download it here

Attaching Emails In OWA 2010…

Outlook Web App (OWA) 2010 brings a great feature which was only available with Outlook in pervious versions of exchange. It is the ability to attach an email into a message.

In previous versions of exchange, including Exchange 2007 SP2, we can’t attach an email from our inbox into a new email and send it while using Outlook Web Access. The closest option we have is to forward the email. But, this option is available in Outlook.

0

Things are different in OWA 2010. You can attach emails by right clicking the email and selecting “Forward As Attachment”.

1

This bring the email as an attachment into our new email compose window.

2

A very useful feature for mobile users!

Free Powershell Videos…

Idera, the company behind Powershell Plus, have five videos about powershell. There is one for managing Exchange 2007 server as well. Have a look at this website.
Very informative!

Configuring External Postmaster Address In Exchange 2007…

The external postmaster address is used as the sender for system generated messages that are sent to users outside the organization. All domains which are not in the accepted domain’s list are treated as external domains. By default, the External Postmaster address is set to $null. Though it is set to $null, the behaviour is different. It doesn’t mean that there is no email address at all. The transport servers use Postmaster@defaultaccepteddomain as the external postmaster address if it is not explicitly set by the administrator.

This will work fine for organizations that have their default domain as their external domain name (externaldomain.com rather the AD domain.local). But, if you have your AD domain as your default accepted domain, you need to change the postmaster address to an external routable address. As per RFC standards, all domains should have a postmaster address configured and should be able to receive emails that come to that address. Hence you either need a mailbox for the postmaster or add the email address to an existing account.

Running Get-TransportServer gives you the current status of external postmaster address.

1

Set-TransportServer cmdlet have to be used to set the external postmaster address. Run

Set-TransportServer –identity “transportservername” –ExternalPostmasterAddress “emailaddress” This command will only set the postmaster address on the transport server specified.

2

If you want to set the address on all hub transport servers, run

Get-TransportServer | Set-TransportServer –ExternalPostmasterAddress “emailaddress”

3

If you have edge transport servers in your environment, the postmaster address has to be set on a per server basis using the Set-TransportServer cmdlet (you can’t pipe).

“Microsoft Exchange” In Exchange 2007…

The “Microsoft Exchange” is a special recipient object that provides a message sender that differentiates system-generated messages from other messages. It is like an internal postmaster. We are all familiar with the message sender named “System Administrator” in previous versions of exchange. For example, you get an email from “System Administrator” if the recipient mailbox is full. In Exchange 2007, the “System Administrator” has been replaced by "Microsoft Exchange" as the sender. Microsoft Exchange recipient sends different types of messages like DSN messages, quota messages, journal reports etc. Have a close look at the screenshot below & you will understand what I am talking about.

11

The Microsoft Exchange recipient is used as the sender for system-generated messages that are sent to internal users only. When system-generated messages are sent to an external sender, the External Postmaster address is used as the sender of the message. ExternalPostmasterAddress parameter ca be configured using the Set-TransportServer cmdlet.

By default, messages that are sent to the Microsoft Exchange recipient are discarded. It can be good and bad, depending upon your network. For example, a user receives a DSN message from “Microsoft Exchange” and if he/she is intelligent enough to forward the messages from “Microsoft Exchange” to your helpdesk than replying to the email received, you are safe. You can always configure an email address for the Microsoft Exchange recipient and have it monitored, in case one of your users decides to reply. The reply address for “Microsoft Exchange” can be set in Organization Config. By default, it is not set. Run Get-OrganizationConfig to find out.

12

MicrosoftExchangeRecipientReplyRecipient parameter specifies the recipient that should receive messages that are sent to the Microsoft Exchange recipient. Run the following command to configure a reply address.

Set-OrganizationConfig –MicrosoftExchangeRecipientReplyRecipient “emailaddress”

13

Now you don’t have to worry that emails sent to the Exchange Recipient will be discarded!

Finding Mailbox Database Status In Exchange 2007…

Any Exchange admins would have been faced with the task of finding the status of all mailbox databases in the messaging environment, atleast once. The main thing that we are normally after is to find out whether all the databases are mounted properly and to find the ones that are not.

This simple command will help you to get a list of all your mailbox databases and see whether they are mounted or not. Some companies have this as part of their daily morning checks. Though it can be found using the exchange console, it is extremely helpful in large enterprises with too many mailbox servers.

Get-MailboxDatabase –Status | Format-Table Name, Server, Mounted

1

You can use the –Autosize option to have the output in an autosized format depending upon the column width.

Get-MailboxDatabase –Status | Format-Table Name, Server, Mounted -Autosize

2

Server Manager In 2008 R2…

Server Manager was introduced in Windows 2008 operating systems with a view to be the single console which an admin will need. While it serves the purpose to a great extend, one main drawback was the inability to connect to another computer. Let me explain.

If you right click the root of the Server Manager console in 2008 SP1+, you are provided with a few options like to add/remove roles and features. But, we can’t connect to another computer for administration purposes, that way we use to connect from Computer Management.

S1

Windows 2008 R2 addresses the limitation and we can now connect to another computer from Server Manager console. But, there are few things to note.

S2

  • You can only connect to another computer from a 2008 R2 Server.
  • The server which we want to connect to should also run 2008 R2 server core or full edition.
  • Connections can be made from Windows 7 to 2008 R2 if Remote Server Admin Tools (RSAT) is installed on the client.
  • The account that is used to connect should be a member of Administrators group on the remote server.
  • Make sure that firewall rules are modified to pass the connection through.
  • Remote connection has to be enabled in the Server Manager console of the remote server, before we can connect to it.
  • It can be done using powershell, group policy or enabling it in the Server Manager console manually.

S3

S4

Check the technet article for more information.

Mailbox Size In Outlook 2010 Technical Preview…

The Outlook 2010 Technical Preview edition brings a very nice feature for the users, to find out how big their mailbox is and what the maximum size allowed is. In order to find the information, click on the “Office Button” which is next to the “Home” tab.

Outlook Office Button

It brings up the “Account Information” window and in the “Mailbox Cleanup” section, it shows the mailbox usage, something that we are used to in Gmail. It really helps the users to keep their mailbox within limits.

Outlook 2010

The Cleanup Tools provide user with links to archive, empty “deleted items” folder and run mailbox cleanup wizard.

Outlook 2010 Option

How To Block Users From Sending Emails Outside Your Organization In Exchange 2007…

A question that comes up many times in forums is how to block users from sending emails outside the organization in Exchange 2007. Though the process is simple, I though I will blog it & make it easier for me to answer those questions in the forum by providing the link!

If you have many users or say a department that you want to block from sending emails outside, you can create a transport rule in Exchange 2007. In order to create a rule that blocks people from mailing outside, follow the steps.

  • Create a distribution group, say “No Outbound Emails” and add all users whom you want to block into it.
  • Navigate to Organization Configuration -> Hub Transport -> Transport Rules.
  • Click the “New Transport Rule” from the actions pane.
  • The wizard starts, give a sensible name.
  • Select “from a member of distribution list”, click on distribution list and select the group that we have created before.
  • Select “send to users inside or outside the organization”, click on Inside & change it to Outside.
  • Click Next
  • Select “send bounce message to sender with enhanced status code”.
  • You can change the default message “Delivery Not Authorized, Message Refused” to something more meaningful.
  • Click Next.
  • Click Next again.
  • A summary will be displayed, click New & Finish.

TR1

The rule will be active straightaway. If you want to block more users in the future, just add them to the group that we had created in step 1.

What if you want to block receiving external emails?

With the above method, users in that group will note be able to receive emails, as all groups in Exchange 2007 are protected by default. All groups have “Require that all senders are authenticated” option enabled by default. It’s in group properties -> mail flow settings -> message delivery restrictions -> properties.

TR2

You have to enable this option on the user properties if you want to block one user (may be few) from receiving emails from outside.

Page 1 of 3123»