Link to home
Start Free TrialLog in
Avatar of Todd Mostowy
Todd MostowyFlag for United States of America

asked on

need query to show what exchange mailboxes were created this year

So we are doing our 2011 MS True up and Exchange 2010 shows that we have 1600 mailboxes.  This is strange to me since last year we had 1050 mailboxes and have not added that many users.  

Can you point me to some sort of query that will show me what mailboxes were created this year?

Avatar of Benjamin MOREAU
Benjamin MOREAU
Flag of France image

Hi !

You have to download & install free QAD Powershell : http://www.quest.com/powershell/activeroles-server.aspx

Then, run on Active Roles powershell : Get-QADComputer | select Name, WhenCreated | Export-Csv EXPORT.CSV

Benjamin.
this should work via standard powershell on your dc (non-tested):

$Date = New-Object DateTime(2011,01,01,0,0,0)
Get-ADUser -RecipientTypeDetails User -Filter { whenCreated -gt $date } -Properties whenCreated | Select Name,whenCreated,distinguishedName | FT -Autosize -Wrap
ASKER CERTIFIED SOLUTION
Avatar of Benjamin MOREAU
Benjamin MOREAU
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Todd Mostowy

ASKER

These will show when Exchange Mailboxes were created?  Let me run some tests.
None of the shells.  2008, ActiveRoles or EMS will accept GET-QADUser.  I tried both of your scripts and they will not run..  See this error.


The term 'Get-QADUser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
 spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:12
+ Get-QADUser <<<<  | select Name, WhenCreated | Export-Csv EXPORT.CSV
    + CategoryInfo          : ObjectNotFound: (Get-QADUser:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
Have you install the QAD Powershell ? If No, install it. If Yes, you must run the command line from this powershell (start menu > Quest > Active Roles Powershell) and not from the standard powershell.
I did run this from ActiveRoles Powershell...  Can you post the script so I can copy/paste it into a PS1 file?
You don't NEED to install QAD. This would work the same using:

get-mailbox | where-object {($_.whencreated -like "*2011*)} | format-list name,whencreated