Exchange 2010 get list of mailboxes with logon time information

Below you can find script which will return all mailboxes where LastLogonTime is older than 90 days ago.

You can easly set this date in variable $days.

 

Function New-Array {,$args}
$Report = New-Array

$days = "90"

$date_last = (Get-Date).AddDays(-$days) 
$mailboxes = Get-Mailbox -server mxmbx01 -ResultSize unlimited

foreach($mailbox in $mailboxes) 
{ 
  $mbx_DN = $mailbox.DistinguishedName 
  $email = $mailbox.PrimarySmtpAddress.toString()
  $Stat = Get-MailboxStatistics -Identity $mbx_DN | Where-Object {$_.lastLogonTime -lt $date_last} | Select-Object DisplayName, totalitemsize,LastLogonTime

 if ($Stat){
  $tmp = New-Object System.Object
  $tmp | Add-Member -type NoteProperty -name DisplayName -value $($stat.DisplayName)
  $tmp | Add-Member -type NoteProperty -name Email -value $email
  $tmp | Add-Member -type NoteProperty -name TotalSize_MB -value $($stat.TotalitemSize.value.ToMB())
  $tmp | Add-Member -type NoteProperty -name LastLogon -value $($stat.LastLogonTime)
  $Report += $tmp
 }
}
$Report | Export-Csv D:\Scripts\lastlogon_report.csv

 

As a result of this script, you will get .csv file, with informations DisplayName, email address, size of mailbox in MB, and last logon time.

 

 

Print Friendly

Exchange 2010 SP3 Database copy status goes to failed after database move

If you have installed SP3 for Microsoft Exchange 2010 you can experience an issue with database copy status.

When activating a passive copy of an Exchange 2010 SP3 database via PowerShell or the Exchange Management Console, the mounted database will dismount without issue and the passive copy will mount. While at the initializing stage on the now passive copy, the database copy status  will change to a failed state.

The status message for the database copy shows failed, and the log indicates:

“The Microsoft Exchange Replication service encountered an error while inspecting the logs and database for DB\Server on startup. Error: File check failed : Logfile ‘f:\logs\DB\Enn.log’ is generation 2024; however the expected generation is 2004.”

Continue reading

Print Friendly

Exchange Support – only one year left

Those of you, who still use belows following system, should know that all of those products reach end of their  extended support window next year at April 8th 2014

Also Windows Server 2003 will reach end of support at April 14th 2015.

Make sure that you are able to migrate to a supported product prior to the support expiration date.  Security updates willnot be provided for products that are not supported.

 

 

Print Friendly

Microsoft Exchange 2013 CU1 offline help files

With CU1 for Microsoft Exchange 2013,  Microsoft released offline help files for Exchange 2013 CU1.

Files are available as offline, so you can view them without any problems, without access to the Internet.
You can download the files from the website:

Microsoft Exchange Server 2013 Help

 

 

Exchange2013CU1_HelpFiles

 

Files are divided into two distributions of Microsoft Exchange 2013:

 

 

Print Friendly

Distribution Groups nested – get list only groups

Recently, we described how to obtain a list of all mailboxes in the group that has nested distribution groups.

Unfortunately, using this method, you can not get a list of groups in a distribution group, only users (mailboxes).

To obtain this list, you need to write more or less complicated powershell script or use the additive Quest Powershell Module for Active Directory.

 

After installation of Quest Module, run powershell console and run:

add-PSSnapin quest.activeroles.admanagement

Continue reading

Print Friendly

Get distribution group all members – nested

How can we get a list of mailboxes belonging to a distribution group?
In a simple way, by using the EMC console and check who is a member of a group, or by using powershell EMS console and use the command:

Get-DistributionGroupMember Test_Group

 

In this way we get a list of objects in the group, both mailboxes, contacts, and other groups.

And here there is a problem, because if the distribution group includes the next distribution group, and this again next etc, how can we get a list of all people who receive an email after sending a message to a distribution group?

Unfortunately, using only the Get-DistributionGroupMember we won’t get such information.

This command returns only the objects directly in a group, without nesting.

In this case, we have to use PowerShell commands for Active Directory available.

To do this run EMS console and import the Active Directory module command as follows:

import-module ActiveDirectory

Continue reading

Print Friendly

Exchange 2013 CU1 released KB2816900

Today 04/02/2013 Microsoft released CU1 for Microsoft Exchange 2013

Cumulative Update 1 for Microsoft Exchange 2013 can be downloaded here:

Exchange 2013 CU1 Download

 

Ex2013CU1

Description of Cumulative Update 1 for Exchange Server 2013

CU1 for Microsoft Exchange 2013 is the last step for Exchange 2013 and Exchange 2010 SP3 coexistence.

 

Continue reading

Print Friendly

Recoverable Items Audits, CalendarVersionStoreDisabled, Versions, Deletions and other problems

When we have problems with TotalDeletedItemsSize (too large) we should check all items in Recoverable Items folder and subfolders.

To do this we should use following command:

Get-MailboxFolderStatistics -Identity JSmith -FolderScope RecoverableItems | Format-Table Name,FolderPath,ItemsInFolder,FolderAndSubfolderSize

 

As a result we will get list of all Recoverable Items subfolders and information how much space they use.

RecoverableItems

 

How to remove all items from Deletions we wrote in article:

 Exchange 2010 Database size growing problem

 

 

In general, type the following command and Recoverable Items folder size should be significantly reduced:

Search-Mailbox -Identity JSmith -SearchDumpsterOnly -DeleteContent

Print Friendly