Exchange: Content index state failed

If you ever had problems with corrupt databases in an Exchange 2010 DAG setup you might have encountered this error. Trying to activate the database on a server where it has this state will fail. However there is a quite simple fix given that you have a healthy copy of the database on a different server: Update-MailboxDatabaseCopy -Identity DB -SourceServer -CatalogOnly Run the command in the Exchange Management Shell and it should fix the Content index state and allow you to activate the database again....

January 16, 2013 · nerenther

Exchange: Activate Database Copy fails

After some exchange services failed on one of the nodes in our Exchange 2010 DAG we got some problems with one database. The database was mounted on server2 where it has an activation preference of 2. Trying to manually activate the database on server1, where is has an activation preference of 1, resulted in the following error: ——————————————————– Microsoft Exchange Error ——————————————————– Cannot activate database copy ‘Activate Database Copy…'. Activate Database Copy…...

January 16, 2013 · nerenther

Function for locating an email address

Yesterday I was given a relatively easy task: find out who or what has a given email address. As this was within our own Exchange organization it proved to be quite simple: You can achieve the goal with a simple one-liner: get-recipient -ResultSize unlimited | where {$_.emailaddresses -match "email@address.com"} But wouldn’t it be easier to have it in a function? In Powershell, creating functions isn’t all that hard. Basically all you need to do is wrap the command or script block with a function statement, see here:...

August 28, 2012 · nerenther

Check if DAG databases is on preferred server

If you are using DAG in exchange 2010 for high availability on your mailboxes there may be one thing you might have noticed, the databases can fail over to a less preferred server at any time without you noticing. Microsoft have provided you with a script for balancing these databases, RedistributeActiveDatabases.ps1. With this script you can activate the databases on their preferred server again. But how do you know when they have failed over?...

April 30, 2012 · nerenther

Mass import of users in Active Directory v2 – Powershell time

Earlier I posted a script that created users and homefolders and added the users to specified groups. It also set ntfs permissions on the homefolders. That script used primarily old fashioned stuff, so I sat down and started looking for a neat way to do the same in powershell. The powershell script I came up does a lot more than the last one. Here a little list: Creates OUs Creates users Creates security groups Creates distribution groups Creates mailboxes for all users Add specified users to the correct security and distribution groups Creates a homefolder root folder and shares it Creates a homefolder for each user and sets ntfs permissions Set storage limit on the exchange mailbox database As you can see, it does quite a lot....

October 27, 2011 · nerenther

Install and configure Exchange 2010 using Powershell

In this guide I will show you how to install and configure a simple Exchange 2010 environment using no gui at all. Installing exchange 2010 without gui may seem kinda nerdy, but it’s quite useful for quickly setting up a test environment for example. Remember to run Windows update prior to the installation. Start powershell as administrator and type: import-module servermanager First we need to install all of the prerequisites:...

September 29, 2011 · nerenther

Enable Resource Booking Attendant on all Room Mailboxes

The Resource Booking Attendant should be enabled on all your Room Mailboxes. If it is not, the room will not accept or decline incoming meeting requests. Which is somewhat the whole point right? Heres a powershell command to enable it on all the Room Mailboxes in an exchange organization: Get-Mailbox -RecipientTypeDetails roommailbox | Set-CalendarProcessing -AutomateProcessing AutoAccept

September 12, 2011 · nerenther

Editing permissions on all mailboxes in one command, Exchange 2010/2007

If you have some sort of 3rd-party application that needs access to all of your mailboxes, it can be a pain to set the permissions on all of your mailboxes. Except if you use this nice little powershell command: Get-Mailbox -ResultSize unlimited | Add-MailboxPermission -User admin -AccessRights FullAccess -InheritanceType all What this command will do is to add Full mailbox access to every mailbox in your Exchange organization for the user admin....

August 18, 2011 · nerenther

Receive connector allowing anonymous relay on exchange 2010/2007

Often it’s a good idea to have a receive connector allowing certain devices to send mail through you exchange server without having to authenticate. One example from where I currently work is printers. We never set up the printers ourselves, that job is done by the provider. And do we want to give them a username and password allowing for mail relay through our servers? No, we don’t. It’s a better practice to have them only input the name/ip-address of one exchange server with the cas role....

August 17, 2011 · nerenther

Activesync issue on Exchange 2010

At work we are currently migrating to a new active directory domain. The migration hos gone rather smoothly except for a couple of users who are not able to sync mail on their phones. After a little research I found the following events in the event log on our exchange CAS server: Log Name: Application Source: MSExchange ActiveSync Date: 04.08.2011 11:00:48 Event ID: 1053 Task Category: Configuration Level: Error Keywords: Classic...

August 4, 2011 · nerenther