Gotchas – OCS-all.ps1 and Exchange 2010 Edge queues

Just a couple of gotchas I wanted to note for my own memory, and if they help someone else then cool…

First is a typo in the OCS-all.ps1 script which is part of the OCS 2007 R2 resource kit (written by James o’Neill and others a while back now), and is a collection of functions to use Powershell for OCS – essentially using WMI to get and set info on users and server/org config.

The Get-OCSUser function has a line which has an ‘=’ where it should have a ‘-eq’ – this means that passing the -URI parameter is ignored and lists all OCS-enabled users – this means that other functions (such as New-OCSUser) which call this function don’t behave as expected. Because it lists alll enabled users everytime we enable a new user our script was taking forever to run. After fixing the problem I found it was actually documented at

The other one is Exchange 2010 based, and isn’t a confirmed bug, but looks like it. We have 2010 Edge servers, and saw our queues rising when no changes had been made to the environment that we knew of. DNS was working OK via nslookup, and I could telnet out and send mail, but Exchange was failing to do so (DNS query error reported). We changed the setting on the send connector to ‘use external DNS lookups’, which fixed the problem, but shouldn’t of really as we didn’t set any external DNS servers on the properties of the Edge server. After a bit of trawling the forums, looks like this might be a bug related to Exchange on Windows 2008, where Exchange uses Ipv6. You can’t (shouldn’t) disable IPv6 on an Exchange server (not tested/supported by MS), but the external DNS setting is ‘all IP4 addresses’), so if you set this on the connector it forces it to use IPv4 and resolves the issue. Host file entries can achieve the same goal apparently, albeit in a less managed way.

This entry was posted in Exchange 2010, OCS 2007, Powershell. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s