Showing posts with label exchange 2010. Show all posts
Showing posts with label exchange 2010. Show all posts

Find parent path to a mail enabled public folder

2 Kommentare
In EMC of Exchange 2010 you can use the following command to show the parent path to a mail-enabled public folder:

get-recipient address@domain.com | Get-MailPublicFolder  | Get-PublicFolder

Name                                         Parent Path
----                                         -----------
address@domain.com                           \folder1\folder2

Version 1.3.1 of Ex2010_MBDB_Info released

14 Kommentare
I've released a new version of the check. I've changed the Windows plugin. It is now a pure Powershell script, not a command script anymore. It should run smoothly to avoid problems, which some of you had in the past running the plugin.
To update it's enough to download the new check package, install it in your check_mk instance by a command like this:

cmk -vP install Ex2010_MBDB_Info-1.3.1.mkp

and substitute the cmd file on your Exchange server by the Ex2010_MBDB_Info.ps1 file from the new package.

You can find the new version of the package at the known place at the check_mk plugin exchange site.

Find differences in Public Folder replicas

0 Kommentare
This is a small piece of code to run it in EMS and to help you finding differences in item number in a public folder structure. The powershell script shows the number of elements in each sub folder for the both of Exchange 2010 servers, which public folder replicas are located on. Below is an example output of the script.


[PS] C:\>C:\scripts\get-pffolderdiffs.ps1

Path                                       ItemCount_SRV1 ItemCount_SRV2
----                                       -------------- --------------
\PF1\VPC                                                 0             0
\PF1\VPC\Exec                                         1739          1739
\PF1\VPC\Exec\2007                                   20406         20406
\PF1\VPC\Exec\2008                                   21952         21952
\PF1\VPC\Exec\2009                                   27804         27804
\PF1\VPC\Exec\2010                                   16888         16888
\PF1\VPC\Exec\2011                                   39021          1869
\PF1\VPC\Exec\2012                                   15734         15734

Please note that the script is provided AS IS without any guarantee:


$PF='\PF1'
$SR1='SRV1'
$SR2='SRV2'


Get-PublicFolder -Server $SR1 -ResultSize unlimited -Identity $PF -Recurse `
  | Sort-Object -Property @{expression={$_.ParentPath + '\' + $_.Name}} |
ft @{label="Path"; expression={ $_.ParentPath + "\" + $_.Name }},
   @{label="ItemCount_$SR1"; expression={ `
     (get-PublicFolderStatistics -Server $SR1 ($_.ParentPath + '\' + $_.Name) `
  | Select-Object -ExpandProperty ItemCount) }}, `
   @{label="ItemCount_$SR2"; expression={ `
     (get-PublicFolderStatistics -Server $SR2 ($_.ParentPath + '\' + $_.Name) `
  | Select-Object -ExpandProperty ItemCount) }} -auto



Check_MK check to show some data about Ex2010 mailbox databases

21 Kommentare
A few days ago I finished to test a new check for check_mk and published it as package at Check_MK Exchange. I named the check "Ex2010_MBDB_Info". In this article I'd like to share a couple of details about the check and its functionality.

The purpose of the check is to get the size of mailbox databases and the count of the mailboxes in each of them. The check package consists of the check itself, the plugin for check_mk agent, the perf-o-meter helper file and the pnp-template.

Lock and unlock an ActiveSync device

3 Kommentare
Assume, a mobile phone or tablet device with a buggy implementation of the ActiveSync protocol causes a lot of traffic or a heavy load in your Exchange 2010 infrastructure (see this article of mine for an example). You surely could disable the ActiveSync feature for the Mailbox user to disable the access for the user completely. A better way is however to disable only the device, which causes the troubles.

Exchange management shell offers cmdlets to manage ActiveSync devices:

Exchange 2010 transaction logfiles grow very fast

12 Kommentare
A few days ago I had a problem with transaction log files on a Exchange 2010 SP2 RU1 mail server. They grown and grown and grown... I saw above 160,000 (one hundred sixty thousand !!!) files belonging to a single mailbox database. The mailbox database itself was ca. 30 GByte in size. It was then no surprise that the appropriate volume exceeded it capacity after only a couple of hours.

I wouldn't even have noticed the issue but the appropriate backup job that should flush transaction log files among other things failed and didn't run. Because of the failed backup job the transaction log files were not flashed and were not removed but grown.

Transport-Rule in Exchange 2010 to prefix the Subject

0 Kommentare
Assume, you'd like to prepend the subject of an e-mail with a prefix, if the e-mail has been sent from the certain computer and if it has a certain sender name. In this case you can create a new transport rule with Powershell.

For example, the subject should be prepended by the phrase '[Alert]', if the From address contains 'my_sender@company.com' AND if the computer's name, which the email is sent from, is 'my_computer.company.com'. The powershell command below configures this:

New-TransportRule
-Name 'My_transport_rule' -Comments 'My comment'
-HeaderContainsMessageHeader 'Received' -HeaderContainsWords 'my_computer.company.com '
-FromAddressContainsWords 'my_sender@company.com' -PrependSubject "[Alert] "

After the command has been executed the rule is active. It acts in the whole Exchange organization and is not restricted to a single server.

Please note that the argument for the parameter -HeaderContainsWords must contain the name, which the email program on the sender computer actually uses. If the new rule doesn't work as expected, look into the internet headers of a test e-mail and note the computer name, which is in the line Received.

Exchange 2010 Mailbox Database Move

0 Kommentare
It’s very easy to move a mailbox database in Exchange 2010 to a new location. Either you use EMC or you use the cmdlet Move-DatabasePath in EMS. Exchange 2010 would unmount the mailbox database to be moved (it’s unavailable all the moving time), copy the database file, the catalogs, remove them and last mount the mailbox database and set it online.

I prefer to use the cmdlet to move the mailbox database in Exchange 2010:

Move-DatabasePath -Identity 'MailDB' -EdbFilePath 'D:\MailDB\MailDB.edb' 
                  -LogFolderPath 'D:\MailDB'

Please note that if you’re going to start moving the mailbox database by a script or batch file, you should you the following syntax to avoid questions:

Move-DatabasePath -Identity 'MailDB' -EdbFilePath 'D:\MailDB\MailDB.edb' 
                  -LogFolderPath 'D:\MailDB' -Confirm:$false -Force:$true

If you get the error while running the cmdlet:
This operation cannot be performed on a remote server. Please use the -ConfigurationOnly option and then manually move the files.
make sure that you're running the command above on the mailbox database server locally!