Thursday, June 18, 2009
My Work Blog
Thursday, October 23, 2008
Fixing the "Unable to activate send-on-behalf-of list" Error
The Delegates settings were not saved correctly. Unable to activate send-on-behalf-of list. You do not have sufficient permission to perform this operation on this object.
- For Outlook 2003 users apply this patch, then perform the registry modifications described here.
- For Outlook 2007 users apply this patch, then perform the registry modifications described here.
Tuesday, September 30, 2008
Tutorial: Using .NET GUI Widgets in PowerShell
Tuesday, September 23, 2008
"Tickling" GC Re-evaluation for Groups via "Set-DistributionGroup"
One or more users cannot be added to the folder access list. Non-local users cannot be given rights on this server.
Friday, September 12, 2008
Lamest...Bug...Ever....
Wednesday, September 10, 2008
"Tickling" Custom Address List Re-evaluation Via Set-Mailbox
Thursday, August 21, 2008
Counting Mailboxes and Determining Store Sizes
Get-MailboxDatabase | Get-MailboxStatistics | Group-Object -property:database | Sort-Object -property:count | Format-Table count, name -AutoSize
To obtain a count of mailboxes per server:
Get-MailboxDatabase | Get-MailboxStatistics | Group-Object -property:serverName | Sort-Object -property:count | Format-Table count, name -AutoSize
To obtain the total number of mailboxes in your Exchange organization:
Get-MailboxDatabase | Get-MailboxStatistics | Group-Object
(Omitting the Get-MailboxDatabase command will give the count for the current server.)
These examples are wonderful illustrations of the usefulness of the Group-Object cmdlet.
I don't recall where on the web I found it, but the following commands will provide a breakdown of the sizes of all mailbox databases in the organization:
$exchangeservers = Get-ExchangeServer |where-object {$_.admindisplayversion.major -eq 8 -and $_.IsMailboxServer -eq $true }
foreach ($server in $exchangeservers)
{
$db = Get-MailboxDatabase -server $server
foreach ($objItem in $db)
{
$edbfilepath = $objItem.edbfilepath
$path = "`\`\" + $server + "`\" + $objItem.EdbFilePath.DriveName.Remove(1).ToString() + "$" + $objItem.EdbFilePath.PathName.Remove(0,2)
$dbsize = Get-ChildItem $path
$ReturnedObj = New-Object PSObject
$ReturnedObj | Add-Member NoteProperty -Name "Server\StorageGroup\Database" -Value $objItem.Identity
$ReturnedObj | Add-Member NoteProperty -Name "Size (MB)" -Value ("{0:n2}" -f ($dbsize.Length/1024KB))
Write-Output $ReturnedObj
}
}
Thursday, August 14, 2008
Setting Send Connector Message Size Limits
#550 5.3.4 ROUTING.SizeLimit; message size exceeds fixed maximum size for route ##
Ah ha! Lo and behold, Send Connectors have a default message size limit of 10MB, and we didn't modify this when we created the Send Connector for our 2007 Hub Transport servers. This is easily correctable, either via EMC, or via the following EMS command:
Set-SendConnector 'Connector Name' -maxmessagesize 30MB
Friday, August 8, 2008
Export-Mailbox Command Crashing PowerShell on Vista - Resolved!
Finally, Microsoft PSS hit on something that allowed me to find a workaround. After turning off UAC, I could run Export-Mailbox without it crashing PowerShell. Oddly enough, UAC is still active on my co-workers' workstations where I was able to successfully use the command, so the problem is clearly more complex.
Another clue from Microsoft: check the permissions on the registry key "HKLM\Software\Microsoft\Exchange\Exchange Migration". Based upon running TTTrace, I was getting an Access Denied error while trying to hit that key, resulting in the freeing of an internal structure needed to write data to the Application Event Log. The account I was using was a member of a group that was in the local Administrators group, which in turn had Full Control on that key. Perhaps that wasn't sufficient. I gave my account explicit Full Control on the key, turned UAC back on and rebooted. Export-Mailbox worked with UAC on.
Sigh....
Update A further clue: My co-workers were able to run in the command with UAC active and without explicitly giving themselves permissions on the registry key because they were running with elevated permissions, thus sidestepping UAC, whereas I was simply logging in directly to the workstation as the privileged user.
New Distribution Groups in Exchange 2007 Require Sender Authentication by Default
To see what groups are set to require authentication, use the following command:
Get-DistributionGroup | where {$_.RequireSenderAuthenticationEnabled -eq $True}
Please note that the default settings also do not permit the object in the "Managed By" field to edit group membership.
Friday, August 1, 2008
Coolest Exchange 2007 Tip Ever!
Now there is a tip on the PowerShell Team Blog which explains how to pre-compile the .NET frameworks using ngen.exe to pre-populate the Native Image Cache, thus speeding up the loading of all things PowerShell-based. The performance gains are impressive, but I suspect that the script would need to be re-run anytime Exchange or the .NET Framework get updated or patched.
I also note that there doesn't seem to be much of a speed boost on the Exchange servers, just on other boxes that use EMS or EMC to manage Exchange. On our web front-end for self-service mailbox management, the EMS scripts run about twice as fast!
Friday, April 4, 2008
More EMS Goodies
If you have a PowerShell script that needs to have the user enter a password, but obviously don't want the input echoing to the screen, try this:
$Password = Read-Host "Please enter password: " -AsSecureString
The variable $Password can then be passed along to commands that require a secure password string as a parameter.
Distribution Group Goodies
To add the ability to Send-As a group:
Add-AdPermission "Group Name" -user "User Name" –AccessRights extendedright -ExtendedRights "send as"
To delegate rights to modify group membership:
Add-ADPermission –Identity "name of distribution group" -User "name of user" -AccessRights WriteProperty –Properties “Member”
More details: Add-ADPermission.
Thursday, April 3, 2008
EMS Goodies: Distribution Groups and PowerShell
Here are a few PowerShell scripts that I cobbled together to help with our current mailbox migrations from Exchange 2003 to Exchange 2007. The first, grp_and.ps1, takes the names of two distribution groups as parameters and lists all users who are present in both groups. The second grp_not.ps1, lists all users who are in the first group but NOT in the second group. Note that Exchange 2007 SP1 is required to make use of MemberOfGroup in the recipient filter.
grp_and.ps1
# Script for listing which recipients can be found in both groups passed as arguements
function Usage
{
""
"Usage: .\grp_and [DistributionGroup1] [DistributionGroup2]"
" Lists accounts that are found in both distribution groups."
" Two arguments required."
""
exit
}
# Help Request
if ( ( $Args -eq '-?') -or ($Args.count -ne 2) )
{
Usage
}
$grp1 = $(Get-DistributionGroup $args[0]).Identity.DistinguishedName
$grp2 = $(Get-DistributionGroup $args[1]).Identity.DistinguishedName
""
$grp1
" and"
$grp2
" both contain the following recipients..."
"-------------------------------------------------------"
get-recipient -RecipientPreviewFilter {(MemberofGroup -eq $grp1) -and (MemberofGroup -eq $grp2)}
"-------------------------------------------------------"
grp_not.ps1
# Script for listing which recipients are in the first group but not the second, passed as arguements
function Usage
{
""
"Usage: .\grp_not.ps1 [DistributionGroup1] [DistributionGroup2]"
" Lists accounts that are found in the first group but not the second."
" Two arguments required."
""
exit
}
# Help Request
if ( ( $Args -eq '-?') -or ($Args.count -ne 2) )
{
Usage
}
$grp1 = $(Get-DistributionGroup $args[0]).Identity.DistinguishedName
$grp2 = $(Get-DistributionGroup $args[1]).Identity.DistinguishedName
""
"The following recipients are in "
$grp1
"but are not in "
$grp2
"----------------------------------------------------------------"
get-recipient -RecipientPreviewFilter {(MemberofGroup -eq $grp1) -and (MemberofGroup -ne $grp2)}
"----------------------------------------------------------------"
Tuesday, April 1, 2008
Major Flaw in Exchange 2007: a Blast from the Past!
KB article 812806 describes a serious bug in Exchange 2000 and Exchange 2003, as well as its fix. The bug manifests itself when an Exchange user sends an SMTP message to an external mailing list address, and the delivery attempt to one or more members of the mailing list generates an NDR, the NDR presented by Exchange to the original sender makes it appear that delivery to the list address itself failed.
Well, this bug has resurfaced in Exchange 2007. A Microsoft PSS support engineer has confirmed to me that the fix described in the aforementioned KB article does not work with Exchange 2007, nor is there a fix in place. An ECR was apparently filed last year to address the issue, but it seems that there has been no progress made on getting a fix out.
Can't Micosoft fix a bug and keep it fixed? Especially on such a blatantly serious bug?
Update: Within minutes of posting this, I received an update from PSS. A hotfix is in the works. Release is tentatively slated for late April.
Thursday, March 27, 2008
Exchange 2007: the Good, the Bad, and the Ugly
First of all, let me say that, as an Exchange Administrator, I'm seriously loving the Exchange Management Shell (EMS), the combination of PowerShell with .NET extensions for managing Exchange. Coming from a VMS background, I'm certainly not averse to a command line, and as I get more and more accustomed to the PowerShell syntax, I'm learning to appreciate it more and more. It is powerful, very powerful, and already, despite being early on in my learning curve, I've managed to write several useful scripts for facilitating that staging of mailboxes into groups for transitioning from Exchange 2003 to Exchange 2007. I've even started tinkering with the ability of PowerShell scripts to create their own GUI. If only PowerShell and the Exchange extensions weren't so slow to load initially. What's more, the 64-bit requirement for running Exchange 2007 was a stroke of brilliance. With 32 GB of RAM stuffed into our mailbox servers, Exchange screams. Now I just have to get our page files sized properly.
Of course, the process has not been without its pain points. Microsoft's instructions for installing SCC (Single-Copy Cluster) Clustered Mailbox Servers fails to point out that, when installing an active CMS instance, the cluster service should be stopped on any passive node where an Exchange role has not yet been installed. Otherwise, during the course of the CMS installation, a failover to the unprepared node will try to take place, which will of course fail, leaving the Exchange installation in such an inconsistent state that the only recourse is to completely uninstall Exchange and start the cluster creation from scratch. Also, in earlier versions of Exchange, it had been our standard practice to pre-create the server objects in AD for our Exchange Virtual Servers. This should not be done with 2007. The server objects for the CMS nodes should be created by the installer. We also had to disable the Windows firewall on our mailbox cluster to allow OWA to work correctly, no matter how many holes we punched into it.
We've encountered quite a few oddities with our environment. When a signed message is sent by Outlook from a 2003 mailbox to a 2007 mailbox, the message body appears blank when viewed in OWA Light, or when viewed by the IMAP client on an iPhone. Somehow, the S/MIME headers are being munged in some bizarre way, and the folks at Microsoft PSS are still scratching their heads over that one. But when the signed message is sent via OWA or Entourage, it appears just fine.
The combination of Entourage 2008 and Exchange 2007 is a godsend for our Mac customers (of which we have many in our University environment.) Previously, delegate assignments were severely broken, and the hacks that Microsoft employed to make WebDAV work with recurring meetings came to be a common source of mailbox corruption. I can't recall how many times of had to do mailbox restores to fix this. Now, with the latest version on each end and the use of the more robust Exchange Web Services (EWS) as the intermediary protocol, life is much better. Recurring meetings are handled properly, and delegation assignments work properly. Much to our chagrin, however, as we migrate to 2007, we've had to tell our Entourage users (2004 and 2007) to change their configuration. With Exchange 2003, we told our Entourage users to specify the Exchange server using the OWA URL "https://exchange_front_end_fqdn/exchange", but that doesn't work with 2007. Instead, just the fqdn of the front-end (CAS) alias must be specified, without the URL trappings. Also, while it is commendable that Entourage 2008 tries to use Autodiscover to acquire configuration settings, the results returned are incorrect. Instead of the Exchange Server setting being populated with the name of the server bearing the CAS role (which is what Entourage should talk to in order to communicate with EWS), the CMS holding the mailbox is returned, which will not work if. It is fine if the CAS and Mailbox roles both reside on the same server, but the Entourage developers do not seem to understand that, in an enterprise environment, CAS and MBX roles are segregated, largely because the CAS role cannot be installed on a cluster.
We'll miss Outlook Mobile Access (OMA), but the new version of Outlook Web Access (OWA) is magnificent, provided that you are not a Mac or Linux user (as many of our users are). Even with Exchange 2007 SP1 installed, OWA Light does not offer Deleted Item Recovery or Public Folder access. (These features were also missing from OWA Premium in the RTM version.) Furthermore, opening someone else's shared Calendar on a non-IE browser via the URL https://CAS_FQDN/owa/TARGET_SMTP_ADDRESS/?cmd=contents&f=calendar results in the error "Access to Calendar folders from Outlook Web Access Web Parts is supported only for Internet Explorer 6 and later."
*sigh* So near, yet so far...
Monday, March 12, 2007
How Microsoft Botched DST 2007
Design Flaws
Before I go into the problems with Microsoft's handling (or mis-handling) of the DST transition, I suppose I should touch upon some underlying design flaws in Microsoft's products which contributed to the issue, and, admittedly, limited Microsoft's ability to respond to the issue in a timely manner.
- Windows Boxes Tick Local Time - Due to the desktop-centric origins of Microsoft's offerings, the system clocks on Windows boxes tick local time (a design flaw shared by OpenVMS), instead of ticking UTC. Systems which tick UTC instead of local time, such as Unix and related operating systems (including Mac OS X), only have to worry about DST issues in the presentation layer.
- Exchange Calendar Data Stored in UTC - Ordinarily, storing Calendar data in UTC would be a good thing, except that combining this with the aforementioned fact that Windows systems tick local time makes rebasing (correcting Calendar items for changes in DST rules) problematic. This is because differing DST rules may be in effect between the time that the Calendar item is created and the time it is displayed. When the item is created, local time is translated to UTC. When the item is subsequently displayed, UTC is translated to local time, potentially (as in this case) under different DST rules. Remember, when we shift in and out of DST, we don't want the local time of an appointment to change, just the underlying UTC time. If a meeting was at 10:00am before, it should still be at 10:00am after DST kicks in. So why bother with the translation to UTC?
- Multiple Timezone Data Fields Associated With Exchange Mailboxes - Exchange Calendar objects have timezone data associated with them. Specifically, there are four timezone fields: OWA timezone, CDO timezone, Outlook timezone, and recurring meeting timezone. ( Please note that if rebasing is performed after the Exchange server is patched, the OWA timezone data is not correctly updated. Unfortunately, this guidance was not provided until fairly late in the process. More on that later.) So, why four fields (not all of which are properly readable by the rebasing tools)? Only a handful of people in Redmond likely know why.
- Windows Stores Only One Set Of DST Rules - Most other operating systems are capable of simultaneously storing multiple sets of DST rules, including specifications of when given rules take effect. This is why most Unix vendors were able to release DST updates shortly after the energy legislation mandating this change was passed in 2005. However, Windows can only store one set of DST rules at any given time, so Microsoft had to wait until after DST ended in the fall of 2006 to release DST patches containing the 2007 rules.
With these fundamental design flaws out of the way, we can now go on to discuss Microsoft's tardy and uncoordinated response to this issue.
I've already touched upon the reason why Microsoft was unable to release the OS-level DST patch until November of 2006 (well behind other OS vendors), but that is no excuse for the fact that the Exchange patch was not available until January, nor were the rebasing tools available until February, and, as mentioned earlier, the guidance for using them kept changing right on through into March. All of these tools should have been fully completed, debugged, and documented in time for release in November, instead of forcing IT departments all across the nation to go into a last minute scramble to prepare for March 11.
This lack of coordination and preparation raises some troubling questions: were the OS and Exchange engineers even coordinating their efforts? Why were the tools not all released at the same time? Why were they not properly tested, leading to changes in vendor guidance for their deployment at the eleventh hour (after it was too late for most of us)?
Speaking of testing, the Exchange Calendar Update Tool is extremely buggy. Not only does it not reliably correct Calendar items (a weakness shared by the Outlook Update Tool for which it serves as a wrapper), but it does not properly extract all four timezone fields for all users. I wasted nearly two weeks on the phone with Microsoft PSS trying to resolve the 0x80004005 errors that the tool was generating whenever I tried to extract timezone data for the users on my Exchange server, only to eventually learn that the solution was to only attempt to extract timezone info for recurring meetings. In other words, when running msextmz.exe, the msextmz.ini file should always have ExportTimezones set to zero or commented out. Just use the ReadCalendarTimezones value for running in export mode. In other words, don't bother trying to use the tool to correct anything other than recurring meetings.
To top everything off, when the tool runs in update mode, it spawns a new Outlook instance for each mailbox being updated, instead of simply using the underlying MAPI libraries. This to me demonstrates the last-minute approach that was taken in putting this tool together.
A Bad Idea Implemented Badly
Of all of the brilliant ideas that Ben Franklin had, Daylight Saving Time, well, wasn't one of them. Sure, it made sense in a world lit only by fire where candles were precious comodities, but it makes little sense in our modern world of 24 hour lifestyles, not to mention the energy lost having to run air conditioning longer in the hot south.
Congress may have had good intentions when they extended DST in the U.S. Energy Policy Act of 2005, but any energy savings that may have been realized have been more than offset by lost productivity. Businesses, especially their IT departments, have had to put countless projects on hold to address this situation, and Microsoft's late and lackluster efforts in this area have certainly not helped matters.
Note: This article is written primarily from the perpective of an IT administrator. For an end-user viewpoint, take a look at http://www.webware.com/8301-1_109-9689890-2.html?tag=nefd.aof .
Tuesday, December 12, 2006
Coolest Feature in SharePoint Yet
Still trying to get my head around some aspects of SharePoint, as we'll have to start shuffling our Exchange Public Folder users over to it. The version of Exchange after 2007 is not expected to support Public Folders...