Recently I posted about one cause of Outlook Web Access errors that users may experience after their mailbox is migrated from Exchange 2003 to Exchange 2007. Users are presented with a browser error containing the message:
Exception type: Microsoft.Exchange.Data.Storage.StoragePermanentException
Exception message: There was a problem accessing Active Directory.
In addition to that common cause I outlined previously there is another cause of this issue that can arise. This usually occurs if an administrator uses the legacy Exchange System Manager tools (eg as part of the Active Directory Users & Computers new account wizard) to create a user mailbox on an Exchange 2007 mailbox server. The legacy tools assign an incorrect attribute to the user account, which is explained further in this Microsoft support article:
This issue occurs when the msExchVersion attribute is not set correctly on the user object in the Active Directory.
Exchange 2007 uses the msExchVersion attribute to determine the version of Exchange that user objects are associated with. If the version value is less than 0.1, Exchange 2007 considers the object “read-only” and cannot write changes to the object.
Note The msExchVersion attribute may not set correctly if you created the user’s mailbox by using the Active Directory Users and Computers Microsoft Management Console (MMC) snap-in instead of by using the Exchange 2007 Management Console.
To resolve the issue you can use the following Exchange Management Shell cmdlet:
Set-Mailbox User_Name -ApplyMandatoryProperties
To check a user for the correct attribute use the Get-Mailbox cmdlet. In my example here you can see both the correct and incorrect attributes displayed.
[PS] C:\>get-mailbox User1 | fl ExchangeVersion
ExchangeVersion : 0.1 (8.0.535.0)
[PS] C:\>get-mailbox User2 | fl ExchangeVersion
ExchangeVersion : 0.0 (6.5.6500.0)
If you have several mailboxes affected by this issue you can find them with this command:
[PS] C:\>get-mailbox | where {$_.ExchangeVersion -like "0.0*" -and $_.ServerName
-eq "exchange2007"}
Name Alias ServerName ProhibitSendQuota
---- ----- ---------- ---------------
User2 User2 exchange2007 unlimited
Similarly you can use this command to correct multiple mailboxes at once:
[PS] C:\>get-mailbox | where {$_.ExchangeVersion -like "0.0*" -and $_.ServerName
-eq "exchange2007"} | Set-Mailbox -ApplyMandatoryProperties
Links:
With a simple Exchange Management Shell command you can display a list of your public folders and the item count for each one. All you need to do is pipe Get-PublicFolder into Get-PublicFolderStatistics like this:
[PS] C:\>Get-PublicFolder \ -Recurse | Get-PublicFolderStatistics
When planning a mailbox migration to Exchange Server 2007 you should consider the amount of transaction logging that will be generated by the move. In low risk environments circular logging can be used to avoid disk space problems caused by the volume of transaction logs generated during bulk mailbox moves.
You can query the current state of circular logging on your storage groups with the Get-StorageGroup cmdlet.
[PS] C:\>Get-StorageGroup | fl name, circularloggingenabled
Name : SG1 Staff A-L
CircularLoggingEnabled : False
Name : SG2 Staff M-Z
CircularLoggingEnabled : False
Name : SG4 Public Folders
CircularLoggingEnabled : False
Name : SG3 Service Accounts
CircularLoggingEnabled : False
To enable circular logging use the Set-StorageGroup cmdlet. You can enable circular logging on all storage groups together by piping a Get-StorageGroup command to Set-StorageGroup.
Get-StorageGroup | Set-StorageGroup -CircularLoggingEnabled $true
Get-StorageGroup will now reflect the change.
[PS] C:\>Get-StorageGroup | fl name, circularloggingenabled
Name : SG1 Staff A-L
CircularLoggingEnabled : True
Name : SG2 Staff M-Z
CircularLoggingEnabled : True
Name : SG4 Public Folders
CircularLoggingEnabled : True
Name : SG3 Service Accounts
CircularLoggingEnabled : True
Use Set-StorageGroup again to disable circular logging after your migration is complete.
Get-StorageGroup | Set-StorageGroup -CircularLoggingEnabled $false
In some companies different departments or branch offices require different primary SMTP addresses. You can configure these for users with Email Address Policies. In this example the company wants all users to have an @company.com address, but each branch office’s users have a primary email address representing that branch.
First we must make sure each of the domains is included as an Accepted Domain, using the New-AcceptedDomain cmdlet.
[PS] C:\>New-AcceptedDomain -Name 'Sydney' -DomainName 'sydney.company.com'
Name DomainName DomainTy Default
pe
---- ---------- -------- -------
Sydney sydney.company.com Autho... False
[PS] C:\>New-AcceptedDomain -Name 'Brisbane' -DomainName 'brisbane.company.com'
-DomainType Authoritative
Name DomainName DomainTy Default
pe
---- ---------- -------- -------
Brisbane brisbane.company.com Autho... False
[PS] C:\>New-AcceptedDomain -Name 'Melbourne' -DomainName 'melbourne.company.com
' -DomainType Authoritative
Name DomainName DomainTy Default
pe
---- ---------- -------- -------
Melbourne melbourne.company.com Autho... False
[PS] C:\>New-AcceptedDomain 'Company.com' -DomainName 'company.com' -DomainType
Authoritative
Name DomainName DomainTy Default
pe
---- ---------- -------- -------
Company.com company.com Autho... False
Then we can configure the Email Address Policies using the New-EmailAddressPolicy cmdlet. In this example I am using the “Office” user attribute to filter recipients.
[PS] C:\>New-EmailAddressPolicy -Name 'Sydney' -RecipientFilter {(Office -eq 'Sy
dney')} -EnabledEmailAddressTemplates 'SMTP:%g.%s@sydney.company.com','smtp:%g.%
s@company.com'
Name Priority RecipientFilter
---- -------- ---------------
Sydney 1 Office -eq 'Sydney'
[PS] C:\>New-EmailAddressPolicy -Name 'Brisbane' -RecipientFilter {(Office -eq '
Brisbane')} -EnabledEmailAddressTemplates 'SMTP:%g.%s@brisbane.company.com','smt
p:%g.%s@company.com'
Name Priority RecipientFilter
---- -------- ---------------
Brisbane 2 Office -eq 'Brisbane'
[PS] C:\>New-EmailAddressPolicy -Name 'Melbourne' -RecipientFilter {(Office -eq
'Melbourne')} -EnabledEmailAddressTemplates 'SMTP:%g.%s@melbourne.company.com','
smtp:%g.%s@company.com'
Name Priority RecipientFilter
---- -------- ---------------
Melbourne 3 Office -eq 'Melbourne'
Here is the result for a recipient who matches the filter for the Sydney policy.
[PS] C:\>Get-Recipient 'Peter Grover' | fl Office,Emailaddresses
Office : Sydney
EmailAddresses : {smtp:Peter.Grover@company.com, SMTP:Peter.Grover@sydney.company.com}