Permanently deleting SoftDeleted Mailboxes in Exchange 2010

Leave a comment

Hi,

When you move mailboxes between databases in Exchange 2010, a copy of the mailbox being moved is retained in the source database, this allows for quick recovery of the mailbox should the move go wrong. Click here (http://technet.microsoft.com/en-us/library/jj863435%28v=exchg.150%29.aspx) for information on how to restore a Soft Deleted mailbox. The mailbox copy in the source database is Soft Deleted and if you check disconnected mailboxes on the source database you should see any mailboxes that have been moved. These Soft Deleted mailboxes will remain until the deleted mailbox retention period has passed.

Should you want to speed things up, perhaps to reclaim new mailbox space in the database then you can use the cmdlet Remove-StoreMailbox to permanently delete the Soft Deleted mailbox. Click here (http://technet.microsoft.com/en-us/library/jj863435%28v=exchg.150%29.aspx) for information on the Remove-StoreMailbox
cmdlet. Keep in mind this is effectively going to release space within the database file that Exchange can reuse, it won’t give you the equivalent free disk space back on the drive hosting the database.

This blog (http://penetrateit.wordpress.com/2012/03/07/exchange-2010-purgeremove-disconnected-or-soft-deleted-mailboxes/) also contains good information and examples on how to bulk delete Soft Deleted mailboxes.

N3ilb

Bulk move mailboxes by LastLogonTime in Exchange 2010

Leave a comment

Hi,

Just a quick tip on how to move a collection of mailboxes based on the time someone last logged into the mailbox. This could be useful if you had mailbox database that only held inactive mailboxes before they were later deleted.

So the EMC command is…

Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.LastLogonTime -lt “<DateYouWantToTarget>”} | Get-Mailbox | New-MoveRequest -TargetDatabase “<DatabaseName>”

If you want to know which mailboxes that would include add a -WhatIf to the end of the command and you’ll get a list of the move requests that would have been created, i.e.

Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.LastLogonTime -lt “<DateYouWantToTarget>”} | Get-Mailbox | New-MoveRequest -TargetDatabase “<DatabaseName>” -WhatIf

Here’s an example, it will get mailboxes that haven’t logged in since before the 1st Jan 2013 and will move create move requests to move them to a database named Database1

Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.LastLogonTime -lt “01/01/2013”} | Get-Mailbox | New-MoveRequest -TargetDatabase “Database1”

N3ilb

AV scanning exceptions for Exchange recommended by Microsoft

Leave a comment

Very handy document that lists out the files and folders within Exchange (2007 – 2013) that should be excluded from AV scans.

http://technet.microsoft.com/en-us/library/bb332342(v=exchg.141).aspx

n3ilb

Monitoring IO performance on Windows Servers

Leave a comment

Hi All,

If you’ve ever supported a SQL server that has been experiencing IO delays you’ll know that SQL will write a warning in the Event Log if an IO delay of 15 seconds or longer has occurred.  In the past I’ve found that this can be a great indicator of an issue with the underlying storage used by the server, be that local disks or even a SAN.

Unfortunately though, if you don’t have a SQL server it can be hard to spot IO delays on a server without lots of perfmon or 3rd party tools, say a server acting as a File Server…

This is where the registry value TimeOutValue under the key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Disk can help identify delays. The value TimeOutValue is the duration that Windows will wait for a hard disk to respond to a command, if the value is exceeded the command will time out and an event will be written to the Event Log with an event ID of 9 (AFAIK).

By default within Windows Server 2003 – 2008R2 this is set to a default value of 60 (seconds). This default value though is too high to often pick up IO delays and therefore the TimeOutValue should be set to 10 (decimal) and the server should be rebooted. Now you can keep an eye out for Event ID 9 showing up in the Event Log which will likely indicate IO issues and it’s time to get thinking about RAID levels, cache settings and disk IOPs.

Hope you find this useful!

n3ilb

AD and Exchange Schema Information

Leave a comment

Hi,

It’s probably not that often that you need to check the version of the Active Directory Schema in regards to the version of Active Directory or MS Exchange you’re running.  You’re probably only curious when you start managing a new environment or look to upgrade an existing one.  Then if you’re like me, off the top of your head, you’ll not remember the attributes in AD to check.  Microsoft’s documentation on this is a bit hit and miss, some articles don’t include the latest and greatest versions of Exchange or Windows i.e. Exchange 2010, 2013 or maybe Server 2008 R2 or 2012.

I’ve found a couple of decent articles that are up-to-date, explaining how to check and what the values stored in AD and which values are which versions of Windows or Exchange, for Exchange here and for AD here.  Exchange 2013 RTM has a forest rangeUpper value of 15137 as indicated here.

To make life a little easier for myself I’ve written a .net 3.5 Windows Form Application that you can run from any domain member with .net 3.5 installed and it will go off and query the information for you.

Schema Checker GUI

This can be downloaded from here (http://dl.dropbox.com/u/51452635/ADSchemaQuery.zip), feel free to use and I hope it saves you some time the next time you need this information.  Please note I’m providing this software FOC without any warranties or support and although I have tested this you run it at your own risk!  I’d always recommend you run this within a test environment before running in a production environment.  If you find any issues with it please add a comment and I’ll try and help you resolve it when I have the time!

n3ilb3

Exchange 2010 SP2 Prereqs

Leave a comment

I’d previously covered this but the original post is out of date as the prerequisites have change in the SP2 build of Exchange 2010… so…

On Server 2008 R2

Powershell with Admin Rights

Import-module ServerManager


Client Access Server

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy, Web-WMI, Web-Asp-Net –Restart

Following the reboot

Set-Service NetTcpPortSharing -StartupType Automatic


Hub Transport Server

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server –Restart
InstallOffice 2010 Filter Packs – http://go.microsoft.com/fwlink/?linkid=191548


Mailbox Server

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server –Restart
Install – Office 2010 Filter Packs – http://go.microsoft.com/fwlink/?linkid=191548  


Edge Transport Server

Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS -Restart


Installing the telnet client – useful to test mail relaying on the Hub and Edge Transport servers

Add-WindowsFeature Telnet-Client


Whitespace in Exchange Databases (2007 and 2010)

2 Comments

Hi All,

Across the lifetime of an Exchange database its size will grow as the number of items it contains grows, the database file (.edb) will increase in size as necessary.  However if the number of items in the database decreases the edb file won’t shrink, rather the freed space within the database is held as whitespace.  This whitespace is then reused as the number of items in the database increases again until it is exhausted at which point the physical file size of the DB increases once more.

This whitespace can be recovered and the physical edb file shrunk, however, to do so means the database will need to be taken offline and an Exchange database defrag carried out.  Keep in mind this can be a time-consuming operation and your database will be unavailable during this process…

Checking whitespace in Exchange is easy enough…

Exchange 2007 – Look in the Application Event Log for Event ID 1221, the event information will tell you how much freespace/whitespace that particular DB has after the last online defrag.

Exchange 2010 – Using EMS and enter the following command – Get-MailboxDatabase -Status | Select-Object Server, Name, AvailableNewMailboxSpace

Hope you find this useful!

n3ilb

Blackberry Enterprise Server (BES) Windows service restart ordering

Leave a comment

Hi All… nothing new here… this is posted all over the web and I got the information from here (http://btsc.webapps.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB13718) but I wanted to make a note of it for my own quick reference…

So order to STOP the services…

Controller
Dispatcher
Router
Then the rest…

Order to START the services

Router
Dispatcher
Controller
Then the rest…

Have fun!!

N3ilb

Installing the Telnet Client from the command line on Server 2008 and Server 2008 R2

2 Comments

So I find it a pain that Server 2008 and 2008 R2 don’t come with the telnet client installed after the initial OS install, the telnet client is a great way to check ports are open for various services, like IIS or SMTP.

On 2008 R2 the quickest way I find to install it is through PowerShell, in a PowerShell window (running as administrator) just do the following…

This won’t work on Server 2008 though…

Instead you need to go with…

Hope you find this useful!

N3ib

Could not start the DCHP Client service on Local Computer

3 Comments

I’ve recently come across a few Windows 2003 servers that were unable to start the DHCP Client service, instead an “Error 5: Access is denied.” message would appear.  Now I’d kind of inherited responsibility of these servers so I wasn’t really aware of their history.

Although the servers we’re using a DHCP assigned address, they were being moved to a new site and network range and as dynamic DNS registration relies on the DHCP Client service its failure to start was making my life harder than it needed to be.

A quick Google brought me to this Microsoft Support article (http://support.microsoft.com/kb/895149) which seemed to describe the problem well.  However upon applying the fix the service still wouldn’t start and gave the same “Error 5: Access is denied.” message. 

At this point I loaded up Process Monitor (http://technet.microsoft.com/en-us/sysinternals/bb896645) and started monitoring the registry while I attempted to start the service.  A bit of digging later and I noted an ACCESS DENIED result when trying to open the key “HKLM\System\CurrentControlSet\Services\Dhcp\Parameters” as shown below

Access Denied Result
Process Monitor Screen Shot

So I granted the Network Service Full control over the key and retried starting the service, SUCCESS!!

If you come across the same issue give Process Monitor a go and keep an eye out for the ACCESS DENIED results when attempting to start the service.  This should point you in the right direction.

Hope you find this useful!

n3ilb

Older Entries