Todd Mostowy
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?
Can you point me to some sort of query that will show me what mailboxes were created this year?
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,distingui shedName | FT -Autosize -Wrap
$Date = New-Object DateTime(2011,01,01,0,0,0)
Get-ADUser -RecipientTypeDetails User -Filter { whenCreated -gt $date } -Properties whenCreated | Select Name,whenCreated,distingui
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
These will show when Exchange Mailboxes were created? Let me run some tests.
ASKER
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
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.
ASKER
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
get-mailbox | where-object {($_.whencreated -like "*2011*)} | format-list name,whencreated
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.