Archive for the Exchange 2010 Category

Examples Exchange Server 2010 Management Shell command lines Part 1

Posted in Exchange 2010 with tags , , , , on October 14, 2012 by uniekdevries

Here are some examples of Exchange Management Shell commandlines I frequently use.

Import a PST file in the mailbox of UserA

New-MailboxImportRequest -Mailbox UserA -FilePath \\server\d$\pst\UserA.pst -BadItemLimit 10

View statistics of all running import requests

Get-MailboxImportRequest -Status InProgress| get-MailboxImportRequeststatistics

Import all pst files found in de PST directory. Make sure the name of the PST file correspondends with the target username

Dir \\server\d$\PST\*.pst | %{ New-MailboxImportRequest -Name import -BatchName batch1 -Mailbox $_.BaseName -FilePath $_.FullName -BadItemLimit 10}

Import a PST file in a subfolder of the mailbox

New-MailboxImportRequest -Mailbox UserA -name Archive -FilePath “\\server\d$\archive 2011.pst” -BadItemLimit 10 -Targetrootfolder Archive2011 

Give UserB full mailbox permissions to the mailbox of UserA 

Add-MailboxPermission -Identity “UserA” -User UserB -AccessRight FullAccess

Give UserB “Send as”  permissions for MailboxA 

Add-ADPermission -Identity ‘CN=MailboxA,OU=Mailboxen,DC=domain,DC=local’ -User ‘UserB’ -ExtendedRights ‘Send-as’

Set review permissions on a user’s mailbox for a mail enabled group 

Add-MailboxFolderPermission -Identity UserA:\Calendar -user GroupB@domain.local -Accessright reviewer

How to view total size of a mailbox? 

Get-MailboxStatistics -identity UserA| ft DisplayName, TotalItemSize, ItemCount

Create a new addresslist  based on emailaddress (domain name)

new-addresslist -name AddresslistA -recipientfilter {(emailaddresses -like “*“)}


How to move Exchange 2010 database log files to other disk?

Posted in Exchange 2010, Windows 2008 with tags , , , , on September 2, 2012 by uniekdevries

We have configured 2 Exchange 2010 servers hosting 4 databases in a DAG. All databases and the log files are on different disks. Because the log disks were to small we decided to move the log files to another disk. The problem is that in a DAG configuration there is no option to move the “database path”. This option is only available after deleting all database copies. Because we didn’t want to remove the database copies we did the following on ALL DAG members:

1. Add the new log disks to the server.
2. Create the same folder structure and set all NTFS permissions.
3. Dismount all databases.
4. Stop all Exchange services.
5. Copy all log files to the new disk.
6. Start all Exchange services
7. Mount all databases

This procedure also works for moving a database to a larger disk.

Error during PrepareSchema phase Exchange 2010 installation

Posted in Active Directory, Exchange 2010 with tags , on June 4, 2012 by uniekdevries

Before installing the first Exchange 2010 server in you organization you have to extend the Active Directory schema. This can be done by running the /PrepareSchema command from the Exchange 2010 DVD. In most cases this stage completes without errors. Except in our environment ;-(

The following error occured:

“There was an error while running ‘ldifde.exe’ to import the schema file ‘C:\Windows\Temp\ExchangeSetup\Setup\Data\PostExchange2003_schema18.ldf’. The error code is: 8245. More details can be found in the error file: ‘C:\Users\username\AppData\Local\Temp\2\ldif.err'”.

Looking into the logfile shows this:

Entry DN: CN=ms-Exch-Mobile-Mailbox-Policy-Link, CN=Schema, CN=Configuration,DC=domain,DC=local

Add error on entry starting on line 358: Unwilling To Perform The server side error is: 0x2114 Schema update failed: An attribute with the same link identifier already exists.

The extended server error is: 00002114: SvcErr: DSID-032603BC, problem 5003 (WILL_NOT_PERFORM), data 8468

Research learns that this error happens  occasionally.

To fix the problem I followed the instructions explained in this Microsoft knowledge base article

To edit the .ldf files I copied the whole content of the Exchange 2010 DVD to the local disk and started from there. At first the PrepareSchema action failed again. I found out that for some reason the setup did not copied the file that I edited but used the default file. To solve this I started the PrepareSchema command and manually copied the file that I edited in the temporary directory that was created by the PrepareSchema command.

In total there were two attributes with a link identifier that already existed. Both attributes were related to the Exchange Mobile Mailbox object.