Exchange Server Share

April 27, 2008

Can’t see Deleted Mailbox in Disconnected Mailbox under Recipient Configuration

Filed under: Exchange, Exchange 2007, PowerShell — Amit Tank @ 4:19 pm

Sometimes when you delete/remove mailbox then you can’t see it immediately in Disconnected Mailbox option under Recipient Configuration.

What you need to do in that case?

Lets consider that we are deleting a mailbox named “Vijay Kumar” in this scenario.

image

When you right click on that and delete, it asks you for the confirmation. Click Yes.

image

Now deleted/removed mailbox should available in Disconnected Mailbox but you are unable to see.

image

You need to run below command to cleanup your database, like in Exchange 2003 we right click on Mailboxes and click on “Run Cleanup Agent” to see the Disconnected Mailboxes after removal of user object in Active Directory.

In Exchange 2007 you can do it with Clean-MailboxDatabase command.

Clean-MailboxDatabase “Database Name”

image

Now, when you click on Disconnected Mailbox then you are able to see the deleted user “Vijay Kumar” into it.

image

Now you have two options for Disconnected Mailbox, either re-connect it or permanently delete it.

If you want to permanently delete mailbox then you need to go through shell command.

In Exchange 2003 we do “Purge” on deleted mailbox, same in Exchange 2007 you need to run Remove-Mailbox command.

$Temp = Get-MailboxStatistics | Where{$_.DisplayName -eq “Vijay Kumar”}

Remove-Mailbox -Database ” DB Name” -StoreMailboxIdentity $Temp.MailboxGuid

 image

This command permanently delete mailbox from the database and you can not see in Disconnected Mailbox.

image

 

Technorati Tags:

April 24, 2008

Exchange 2007 – Message Size Limits

Filed under: Exchange, Exchange 2007, PowerShell — Amit Tank @ 3:55 pm

Users are frequently asking, what are the ways to set the message size limits in Exchange 2007.

Let’s consider that they ask for their outlook users because for OWA we have different mechanism to limit the size.

Microsoft Reference : Managing Message Size Limits

1.   Global/Organizational Limit

2.   Connector Limit

     2.1   Send Connector

     2.2   Receive Connector

     2.3   Active Directory SiteLink Limit

     2.4   Routing Group Connector Limit

3.   Server Limits

4.   User Level Limits

Now lets discuss in detail….

1. Global / Organizational Limits

This setting applies on all the Exchange servers in your organization.

You can set this in two ways…

  • If Exchange 2007 SP1 is not installed then you need to set it using the Set-TransportConfig command from the Exchange shell:

Check the configuration setting by below command.

Get-TransportConfig

image

      Now set the MaxReceiveSize and MaxSendSize by below command.

      Set-TransportConfig -MaxReceiveSize 40MB -MaxSendSize 40MB

image

Now verify the configuration by Get-TransportConfig.

image

  • If Exchange 2007 SP1 is installed then you can set it through GUI. This setting will be configured for all Hub Transport server in the organization.

Organization Configuration -> Hub Transport -> Global Settings tab ->  Transport Settings -> Click on Properties -> set Maximum Receive Size and Maximum Send Size

clip_image002

2. Connectors Limit

2.1. Send Connector

Send Connectors are used for sending outbound messages to the internet or particular address spaces if you have configured.

  • We can configure the message size on Send Connectors through Exchange Management Shell

You can see the current configuration of Send connector.

Get-SendConnector

image

Now, to set the message size on send connector to 40MB run below command.

Get-SendConnector | Set-SendConnector -MaxMessageSize 40mb

image

Or if you know the name then,

Set-SendConnector “Connector Name” -MaxMessageSize 40mb

image

Verify that it has configured correctly.

image

  • Through GUI you can set like below.

Organization Configuration -> Hub Transport -> Send Connectors -> select appropriate connector -> Properties -> General tab -> Maximum Message Size (KB) field you need to set.

image

Note: if you have Edge Server in your environment then it has Send Connector configured to send mail to your Hub Transport server so make sure that it has also configured with correct size.

2.2 Receive Connector

Receive Connectors are used for receiving inbound messages.

  • We can configure the message size on Receive Connectors through Exchange Management Shell

Check the configuration with below command.

Get-ReceiveConnector “Connector Name” | FL Identity, *max*

image

Run this command to set message size on receive connectors to 40MB.

Set-ReceiveConnector “Connector Name” -MaxMessageSize 40mb

image

Verify that it has configured correctly.

image

  • Through GUI you can set like below.

Server Configuration -> Hub Transport -> select a HT server -> Receive Connectors -> select a connector -> Properties -> General tab -> Maximum Message Size (KB)

image

Note : By default, this is set to 10MB so you need to set as per your requirement.

2.3 Active Directory SiteLink Limit

In Exchange Server 2007 SP1, you have an option to set message size limit on AD Site Links.

By default MaxMessageSize on AD Site Links is set to unlimited.

You can see the current settings by below command.

Get-ADSiteLink | FL Name, Sites, *Max*

image

You can change it by using the following command:

Set-ADSiteLink “SITE LINK NAME” -MaxMessageSize 40Mb

image

Verify setting configured correctly.

Get-ADSiteLink | FL Name, Sites, *Max*

image

2.4 Routing Group Connector Limit

If your environment is in co-existence mode, means using Exchange 2003 also then on Routing Group Connectors also you can set message size limit which will take effect when message passes between Exchange 2003 & Exchange 2007 environment.

By default MaxMessageSize on Routing Group Connector is set to unlimited.

Get the information about RGC by below command.

Get-RoutingGroupConnector “Connector Name” | FL Name, *Max*

image

You can change it by using following command.

Set-RoutingGroupConnector “CONNECTOR NAME” -MaxMessageSize 40Mb

image

Verify it is configured correctly.

Get-RoutingGroupConnector “Connector Name” | FL Name, *Max*

image

3. Server Limits

You can set Transport Rule on Hub Transport Servers or Edge Transport Servers to set attachment size limit for some or all mails based on Transport Rule prediction “When the size of any attachment is greater than or equal to limit”.

Reference: Exchange 2007 – Transport Rules & Disclaimer

4. User Level

Individual Users / recipients can be set with their own limits.

  • Check and set through Exchange Management Shell

You can see the current limit by using below command.

Get-Mailbox “User Name” | Format-Table Name, *Max*

image

You can set by using below command.

Set-Mailbox “User Name” -MaxSendSize 40mb -MaxReceiveSize 40mb

image

Verify once it is configured.

image

  • Exchange Management Console: Go to below path to set it.

Recipients -> Mailbox -> select mailbox -> properties -> Mail Flow Settings tab -> Message Size Restrictions -> Set Sending Message Size & Receiving Message Size.

image

Note : If you set user level send/receive size higher than Global/Organizational level then it works for internal purpose only and while sending mail to external recipient Global Level limit takes effect.

Technorati Tags: ,

April 23, 2008

EMC – Where are Mailbox Total Items & Size (KB) Columns?

Filed under: Exchange, Exchange 2003, Exchange 2007, PowerShell — Amit Tank @ 3:50 pm

You would have noticed that you are not able to see the Total Items and Size (KB) of user’s mailboxes in Exchange Management Console of 2007. Even you are not able to add columns optionally.

image

Like you were able to see in Exchange System Manager of version 2003 displayed below.

image

 

Now question is where to see/add those options… Your answer is run the PowerShell command to see those options.

 

When I run below command in Exchange Management Shell for Database name “Mailbox Database”, it gives similar output to ESM 2003. Only difference is it shows size in Bytes instead of KB.

Get-MailboxStatistics -database “Mailbox Database” | Select DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime | Format-Table

 image

Now if I want to export this into CSV the I need to run below command.

Get-MailboxStatistics -Database “Mailbox Database” | Select DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime | Export-CSV test.csv

image

Now lets say I want size in MB then I  need to run below command.

Get-MailboxStatistics -Database “Mailbox Database” | Format-Table DisplayName, LastLoggedOnUserAccount, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=”Size(MB)”}, LastLogonTime, LastLogoffTime

image

 

If I want to sort this report by Mailbox Size then I need to run below command.

Get-MailboxStatistics -Database “Mailbox Database” | Sort -Property TotalItemsize | Format-Table DisplayName, LastLoggedOnUserAccount, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=”Size(MB)”}, LastLogonTime, LastLogoffTime 

image

  • In these examples we got reports for database “Mailbox Database” in same way we can get it for whole server with below command.

      Get-MailboxStatistics -Server MailboxServer01

  • Here we added DisplayName, LastLoggedOnUserAccount, ItemCount, TotalItemSize, LastLogonTime, LastLogoffTime columns in our report and in same way we can add below list of columns …

AssociatedItemCount
Database
DatabaseName
DeletedItemCount
DisconnectDate
DisplayName
Identity
ItemCount
LastLoggedOnUserAccount
LastLogoffTime
LastLogonTime
LegacyDN
MailboxGuid
ServerName
StorageGroupName
StorageLimitStatus
TotalDeletedItemSize
TotalItemSize

 

Technorati Tags: ,

April 12, 2008

Ambiguous / Automatic Name Resolution in Exchange

Filed under: Active Directory, Exchange, Exchange 2003, Exchange 2007 — Amit Tank @ 6:59 pm

Exchange searches various attributes like Name, Surname, Display Name, Mailbox Alias etc… in Global Catalog / Active Directory when you enter some character in To:, CC: or BCC: fields of Outlook and press CTRL + K, it gives you result with any or all matching addresses to your search. This process is called as a Ambiguous Name Resolution or Automatic Name Resolution.

 

You can also add your required properties/attributes, such as Employee ID, to ANR searches so when anybody knows the Employee ID of any person then they can get the email id with it and for that you need to customize the schema attributes.

 

Note : These Schema changes are forest-wide and It CAN NOT be reversed once you change it so make sure you took proper decision.

 

Now lets consider I set Custom Attributes 14 as a Employee IDs for all users in my company and I want to add this attribute in ANR process.

image

image

 

Now you need to change the Schema so you need to register schmmgmt.dll to access it, then Open Active Directory Schema snap-in into MMC and go to Custom Attribute 14 (schema attribute name is extensionAttibute14).

 

You have to select below three checkbox.

1. Index this attribute in Active Directory – To index the attribute in Active Directory so that search result is fast.

2. Ambiguous Name Resolution (ANR) – To add the attribute in ANR process.

3. Replicate this attribute to the Global Catalog – To replicate the attribute in GC so it is available forest wide otherwise it is restricted in single domain.

image

 

After doing these changes wait for sometime to update and replicate across the forest and then you can search for user with Employee IDs. eg. search for Emp ID starts with 18.

image 

April 10, 2008

Delete Corrupted, Hidden or Stale rules from mailbox with MFCMapi

Filed under: Exchange — Amit Tank @ 12:46 pm
Technorati Tags:

This might be useful when you receive duplicate mails in your inbox even message tracking shows only one copy delivered to it. There would be some corrupted, hidden or stale mailbox rules sitting in your inbox to copy mails multiple time.

Refer KB924297 for the same procedure, just additional screen shots.

First copy/export all rules which are live in your Outlook so after deleting all rules we can import it back to outlook.

  • Tools menu, click Rules and Alerts.
  • Click Options.
  • Click Export Rules & save it to safe place.

Download MFCMapi from here Microsoft Exchange Server MAPI Editor.

Note: Before we begin I have to tell you the fact that MAPI Editor is a pretty dangerous tool, it should be used with care and any small misuse could result in the loss of data or a mailbox being completely unreadable – take care and as always ensure that you have a working backup copy if you are new to it.

  • Run MFCMapi, hit OK button on welcome message.

clip_image002

  • Hit Session menu, click ‘Logon and Display Store Table’.

clip_image002[5]

  • If multiple outlook profile is configured in computer then you need to select profile.

clip_image002[7]

  • Double-click the mailbox that contains the inbox rules that want to delete those.

clip_image002[9]

  • Expand ‘Root Container’, expand ‘Top of information Store’.

(If outlook is in cache mode then instead of ‘Top of Information Store’ you may see ‘IPM Subtree’, go back and change the cache mode to online mode)

clip_image002[11]

  • Right-click ‘Inbox’, and then click ‘Open Associated Contents Table’ (which contains the hidden messages of the Inbox).

clip_image002[1]

  • Locate and click the items that have the IPM.Rule.Message as a Message Class, and then click Delete.

clip_image002[3]

  • Select the ‘Permanent delete passing Delete_Hard_Delete’ check box, and then click OK.

 clip_image002[5]

Once you delete all rules your inbox is clean from corrupted, hidden or stale rules.

 

Now you can import back all rules which were live in Outlook and we took backup.

  • Tools menu, click Rules and Alerts.
  • Click Options.
  • Click Import Rules & give your rules file which was saved earlier.

Now you have Fresh Outlook Rules in your inbox.

Next Page »

Blog at WordPress.com.