Matt Ellis

Setting Distribution Group Delivery Restrictions via PowerShell…

Posted by in Exchange, PowerShell

Adjusting the delivery restrictions on distribution groups is quite a common task. The more members a group has the more of a problem this ends up being in big organisations. Setting the permissions in the Exchange Management Console (EMC) is simple enough when you have one or two people/groups to add to the allowed list. When you have many user/groups needing to be added across a massive range of groups then this is something your going to need to script. Now this is where it doesn’t quite work as expected….read more

17

Missing LastFullBackup Attribute on Mailbox Database..?

Posted by in Exchange, PowerShell

This is more of an annoyance if anything but I noticed today that while I could look on the Properties page of each mailbox database and see the LastFullBackup date and time this wasn’t reflected in the Get-MailboxDatabase -Server “SERVERNAME” | fl command. It was simply empty. It seems that if you’d like to get details such as LastFullBackup, Mounted, BackupInProgress or OnlineMaintenanceInProgress you need to use the -Status parameter. So, my command should have been: Get-MailboxDatabase -Server "SERVERNAME" -Status | fl I don’t know why, but that’s the way…read more

0

Get the active node of an Exchange 2007 CCR cluster using PowerShell…

Posted by in Exchange, PowerShell

There’s not a massively easy way of checking for the active node of a cluster without manually going into Failover Clustering or into the properties of the cluster in the EMC. Get-ClusteredMailboxServerStatus will give you the active node by getting the OperationalMachines attribute but if you’d like to use this in scripts or display it in a nice format then it’s not in the most helpful format (it’s an array). It usually looks something like this: {NODE1, NODE2 <Active, Quorum Owner>} Using the following script we can retrieve all the…read more

6

Get rid of trailing whitespace in DisplayName attribute…

Posted by in Exchange, PowerShell

Exchange 2007/2010 doesn’t like trailing whitespaces in the DisplayName of users. If a whitespace exists you will have issues when trying to manage the mailbox via EMC or EMS. This can be very annoying when you have automated systems that create users and append an annoying space to the end of the DisplayName. Here’s a command to find them and trim the whitespace off of the end of the DisplayName attribute: Get-Mailbox -Filter {DisplayName -like "* "} -ResultSize:Unlimited | ForEach {Set-Mailbox -Identity $_ -DisplayName&nbsp;$_.DisplayName.TrimEnd()}

0

Change a user’s ActiveSync policy back to take the Org default EAS policy…

Posted by in Exchange, PowerShell

By default, at the point of creation a user is created to take whatever is the organisation’s default policy. When this is changed to a specific EAS policy the ActiveSyncMailboxPolicyIsDefaulted property is changed to False. This can be annoying in the future as you may want them to revert back to the default policy for the organisation. This won’t happen is they’ve previously been assigned a specific EAS policy. To set the ActiveSyncMailboxPolicyIsDefaulted attribute back to true, just use the following command: Set-CASMailbox -Identity "USER-IDENTITY" -ActiveSyncMailboxPolicy:$null

0

How to upgrade an Exchange 2007 CCR cluster to SP3…

Posted by in Exchange, PowerShell

So, we finished upgrading the organisation to SP3 this morning. We had performed the upgrade to SP3 for the Client Access, Hub Transport and Edge Transport servers last week (as per MS best practice) which was a fairly simple process – you can just run the upgrade through a nice GUI by running the setup.exe. This week’s upgrade of all the clusters was still simple but does require a bit of different process. Hell, they’re clusters – what do you expect..? This process in this post is taken from http://technet.microsoft.com/en-us/library/bb676320(EXCHG.80).aspx…read more

0

Distribution Group Statistics…

Posted by in Exchange, PowerShell

So, I’ve been working on a script that gets a list of all mail enabled groups in the organisation and then queries each one to find out how many members there are (including members of nested groups etc.) It also shows which users and groups have permissions to send to each group and if it’s hidden from the GAL or not. The best (and easiest) way I could find to do this was to use the Quest ActiveRoles Management Shell Cmdlets. They’re free to use and can be downloaded from…read more

0

Cool Little Feature – Auto-mapping shared mailboxes in Exchange 2010 SP1…

Posted by in Exchange

Source: http://www.stevieg.org/2010/08/auto-mapping-shared-mailboxes-in-exchange-2010… Not having used Exchange 2010 SP1 outside the lab this isn’t something I’ve actually run into yet but it is a great example of Microsoft adding functionality that helps the everyday administrator. Put simply, there’s a new AD attribute called msExchDelegateListLink that contains all the mailboxes you have Full Control permissions to. When opening Outlook 2010 this attribute is queried and it configures those mailboxes automatically. Nice touch eh? (Although I do see how this could also cause problems) This is a link to Steve Goodman’s Tech Blog, something…read more

0

Exchange 2007 Message Tracking Across Multiple Hub Transport Servers…

Posted by in Exchange, PowerShell

Unfortunately, message tracking is a daily occurrence for me. Often someone has complained that their really important email hasn’t arrived (it always has – they just can’t find it) or you’ve just got some routing issues you need to sort out? Either way, you’ve probably stumbled across the console version of Exchange 2007 message tracking and been annoyed by the way you can only search across one server at a time. Annoying, I know. Like a lot of other things in Exchange 2007, Microsoft have included a lot more functionality…read more

0

Report on your ActiveSync logs with ease…

Posted by in Exchange

There are many reasons you may want to use this post. Maybe you need to know who is connecting to your environment via ActiveSync and how frequently? Maybe you need to know if any non-approved devices are being used to connect. Maybe, as in my case, you need to lock ActiveSync access down but need to know who is currently using it? There is a nice PowerShell command that will analyse your IIS logs from your Client Access Server(s) and give you various reports based on them. In it’s simplest…read more

2

Bulk add IP addresses to a Receive Connector…

Posted by in Exchange, PowerShell

If you’ve ever had to manually enter a large number of IP addresses into a Receive Connector in Exchange you’ll know how annoyingly boring this is. Fortunately, for you there is a much easier way. First, add all the IP addresses to a text file called list.txt The run the following script: 1 2 3 $ReceiveConnector = Get-ReceiveConnector "SERVERNAME\ReceiveConnectorName" Get-Content C:\list.txt | foreach {$ReceiveConnector.RemoteIPRanges += "$_"} Set-ReceiveConnector $ReceiveConnector -RemoteIPRanges $ReceiveConnector.RemoteIPRanges Good eh!?

2

Find all mailboxes hidden from the GAL…

Posted by in Exchange, PowerShell

I was asked the other day how we could find all mailboxes hidden from the GAL. This used to be pretty hard in Exchange 2003 but thanks to PowerShell this is now pretty easy. This command will get you every mailbox in your organisation that is hidden from the GAL. I’ve put the -ResultSize Unlimited value in there as your org is likely to be larger than 1000 mailboxes: Get-Mailbox -ResultSize Unlimited | Where {$_.HiddenFromAddressListsEnabled} You can obviously tailor this command to do what you like but it’s one example…read more

1

Configure mailbox database settings using PowerShell…

Posted by in Exchange, PowerShell

One thing I used to like about Exchange 2003 was System Policies. It made it easy when creating a new server with multiple stores to just chuck the server into the server policy and the stores into the appropriate mailbox store policy. Of course, Exchange 2007 did away with this. I understand the reasons – it just means you have to run a shell command a few times. This command sets everything you need on the mailbox database. Just adjust the settings to your organisations needs and change the –Identity…read more

0

OWA error caused by incorrect ExchangeVersion attribute…

Posted by in Exchange, PowerShell

When you migrate from Exchange 2003 to 2007/2010 one of the most time consuming things is re-educating the helpdesk and administration teams to use a different set of tools to do their daily job. In my experience they will still try to use the old tools and mistakes will be made. When an Exchange 2007/2010 user is created using the AD Users & Computers MMC snap-in (dsa.msc) instead of the Exchange 2007 Management Console/Shell all seems fine until the user tries to access OWA. In this instance they will see the…read more

0

Google adds DKIM support to Google Apps…

Posted by in News

Google have just introduced the ability to enable DKIM (DomainKeys Identified Mail) signing to all Google Apps accounts. It can be enabled in Advanced tools and goes some way to stop the often criticised blocking of mail coming from Google servers by corporate mail security systems. All you need do is create a TXT DNS record and bob’s your uncle. More details here: http://ellis.li/hIvwQP Good work Google.

0