How to search and delete users email messages in their mailboxes before a specific date/time – Exchange 2010

Exchange Server logo

Little intro

I’ve got a case where the customer wanted to delete all of his users’ data in their mailboxes on the Exchange Server, that they got before 1-JAN-2018. He has an incident happened with some leaked critical email messages and he wanted to prevent it by taking this action!

The way to do this of course is pure PowerShell. So I first had to analyze the requirements then build an image in my brain for how the work is going to happen, then test it. And finally implement the needed changes.

Basically what I came to put together is, first I need to backup the data that I will delete. Then I need to delete the data.

To backup the data I need to export the mailboxes to a PST file. And the delete the data I have to use the Search-Mailbox cmdlet with -SearchQuery property.

That was the … Read the rest “How to search and delete users email messages in their mailboxes before a specific date/time – Exchange 2010”

What to do when New-MailboxExportRequest stuck on “Queued” status

Exchange Server logo

Intro

This is just the back story for this incident and the Exchange Server environment setup. Skip to The issue section for the actual stuff

I recently had a project started to migrate an Exchange Server 2010 organisation to G Suite. The customer had 4 (very old) servers, 2 DAG and 2 CAS. While we were preparing for the data migration phase we hit a very hard brick wall. 3 hard disks on one of the servers decided it was time for them to smoke. Luckily they had 6 disks on that server, and they were using RAID5. Few days after replacing these drives, another different drive on the same server followed its fallen brothers!

So they managed to keep their servers up and were quick to replace the damaged disks at the end. However this was not the case for the databases on the server. Once of the databases … Read the rest “What to do when New-MailboxExportRequest stuck on “Queued” status”

Tips for designing a coexistence scenario between Exchange Server and G Suite

I’ll try in this article to list and briefly explain what need to be considered and checked while designing the coexistence scenario between the Exchange server and G Suite.

It is worth to mention that basically 90% of the work is not going to change for most of projects, so this can serve as a reference and a plan to apply for most of the projects to come.

Through out the work and experience I have got, I believe the below points are the most common settings and configuration that need to be checked and changed. I’ll also keep the list updated with anything I encounter that is not on it later on…

Put all contact objects used for forwarding in a separate special OU

You will face the need to create mail contacts on the Exchange server to forward mail to them. Depending on the size if the project, … Read the rest “Tips for designing a coexistence scenario between Exchange Server and G Suite”

PS: Read and output mailboxes and their sizes

In order to get a list of all (or part) of the mailboxes and view their sizes, simply use the following PS script:

The above command, will get all the mailboxes, and list their sizes and the database they are member or, then output the result to a text file called mbx_sizes.txt…

You can change the sorting to be Ascending, to have the smallest mailbox on top…

Also, you can get the sizes for mailboxes in a specific database by:

Read the rest “PS: Read and output mailboxes and their sizes”

PS: Bulk forwarding mailboxes to external addresses

Sometimes you get a sudden need to forward bulk users’ mail to external destination… in normal days, you would create a mail contact, then forward the selected user’s mail to the new external contact.

Now what if you got a large number of contacts to forward? well, you can either:

  1. Manually create all the required mail contacts, then assign each user to each contact.
  2. OR THE BETTER WAY: Use the magic of PowerShell!

This is a very simple and quick procedure…

First, you will need to create the contacts, which you can find how in the following post: PS: Creating bulk mail contacts

Then with another script, you will forward each user to his corresponding mail contact item:

You can Read the rest “PS: Bulk forwarding mailboxes to external addresses”

PS: Creating bulk mail contacts

Below is a useful script to create bulk contacts in Exchange Management Shell:

You need to have the following prepared before you use the script:

  1. A CSV file contains 2 headers: Name, ExternalAddress, with all the contacts list that you want to create.
  2. Save the CSV file in C:\ (to be completely complied with the script above, otherwise save it where you want, but make sure you specify it’s full path in the script above instead of “C:\NameList.csv”.

To make it a bit easier, here is the script ready, just open EMS and run it from there after you make sure the file is ready…

Bulk-MailContactRead the rest “PS: Creating bulk mail contacts”

Unable to uninstall Exchange server 2010 while mailbox database has un-moved arbitration mailboxes

Hi

It has been a while since I did a transition for Exchange server 2010, and last days I did one…

Today I was doing the final part of it which is decommissioning the old server, I did it but I had to do some extra work to finish the job…

I had moved all the users mailboxes to the new server, and the database seems empty, but in fact, it was not, because there were some system mailboxes called Arbitration mailboxes

So when trying to uninstall the server, I got the error about existing mailboxes still on the database of the server I want to remove!

All I had to do is move these mailboxes to the new server and I was done (NEVER REMOVE THESE MAILBOXES UNLESS YOU ARE REMOVING THE LAST SERVER IN THE ORGANIZATION)

  • The first step is to list all the arbitration mailboxes
Read the rest “Unable to uninstall Exchange server 2010 while mailbox database has un-moved arbitration mailboxes”

Outlook Continuously Asks for User Name and Password in Exchange Environment

Hello Everybody,

I have got through a problem where MS Outlook continuously asks for user name and password to authenticate the user for exchange…

This could be annoying for users and frustrating for the guys who are troubleshooting that, today I made some researches about problem and I got some solutions for it, but all are on the client side, so imagine if you have about 100 clients, you need to go to all of them and apply the fix (if it was the right solution), of course this is not acceptable at all, so I made some more searches about it into the server and I got to the bottom of it…

Before I put my solution, I would like to clear something, which is this solution has came from experiencing the problem with my configuration, so most likely your configuration will be different from mine (maybe you will … Read the rest “Outlook Continuously Asks for User Name and Password in Exchange Environment”

PS: Managing Exchange Users Using Groups

Hello everybody

Last few days  I was having too much troubles with the rain, and the situation was not good at all in Jeddah, I even had to spend 1 night out of home… 🙁 because the water has blocked almost all the roads in the city… actually you can see a bit of what happened from my Facebook profile: http://www.facebook.com/salehram, well, it is in Arabic so you better know some Arabic if you are not Arabic 😛

OK, I almost forgot the main reason of this topic 😀 , it is about managing the Exchange users using the Groups in Active Directory…

There are many ways to manage the users in the Exchange, the easiest at all is using the EMC (Exchange Management Console), and there are many methods to do that, for example you can:

  • Just go for the user you want and right click him
  • Multi-select a
Read the rest “PS: Managing Exchange Users Using Groups”

Error when trying to prepare the organization for Exchange 2010 installation (otherWellKnownObjects attribute)

Hi all,

Sorry for going offline for too long, I was having some bad times (happens to all :-) )

I am going to talk today about a problem that I have passed long ago, but did not expect to encounter again, it is related to the exchange 2010 and active directory…

Now as you all know that Microsoft Exchange Server 2010 and previous versions as well, are active directory-integrated, which mean that when ever we install the exchange system into the network, it will be having roots (this how I would like to call it anyway) in the active directory schema, which by itself (the schema) is the blueprints of the whole Windows network…

The above introduction, I had to write it to let you get close to the problem I am going to talk about; it is related to the removing of the exchange server, and more specific way… … Read the rest “Error when trying to prepare the organization for Exchange 2010 installation (otherWellKnownObjects attribute)”