SMTP Port 25

Anything and Everything Related Exchange, Emails and Active Directory and Scripting, Its My Life !!!

  • Microsoft MVP – Powershell

  • Expert Certificate

  • Visitors from the Globe

  • Blog Stats

    • 333,878 hits
  • Meta

  • Disclaimer

    The content on this site is provided "AS IS" with no warranties, and confers no rights.

  • My tweets..

    • watching "zindagi na milegi dobara".. man its touching.. 4 months ago
    • Its one of the my coldest day ever seen in Bangalore - 19°C and its expected to reduce between 18°C to 16°C on 31st and 1st 4 months ago
    • Started to explore Lync 2010. I got to deep dive into it... 4 months ago
    • Weekend drive to Wayanad was beautiful. Been to kerala after 6 years. Some good old memories was sweet ;) 5 months ago

Count of Mailbox Created in last Week/Month

Posted by Krishna - MVP on May 13, 2009

 

We always for some reason need to find the count of the mailbox created in last week/Month etc. Below is the powershell command to get the count

$Result = Get-Mailbox -resultsize unlimited | where {$_.WhenCreated -gt (get-date).AddDays(-30)} | Select displayName
$Result.Count

To get the details to the text file you can use the below mentioned command to export to the text file

Get-Mailbox -resultsize unlimited | where {$_.WhenCreated -gt (get-date).AddDays(-30)} | Select displayName, Servername,Database, WhenCreated >> Result.txt

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 31 other followers