Jump to content

Recommended Posts

Posted

Hi All

 

In Office 365. Does anyone know of a powershell script that will list the mailbox creation date and export the list of users to a csv file?

 

There are at least 2 on the web but I can't get either to work properly

 

Many thanks

 

TL

Posted

Connect to Office 365 with PoSH , the a quick down and dirty way would be:

 

Get-Mailbox | Select Name, WhenCreated | Export-CSV C:\Temp\Mailboxcreation.csv

 

Remember to change the file save path if required.

 

LYB

  • Thanks 1
Posted
Thanks LYB, but all that does is list the names and dates this year. The dates can't possibly be right because another report I ran reveals that a large proportion of our users have NEVER logged on.
Posted

Hi theo_logical

 

The WhenCreated filter shows when the mailbox was created, and the mailbox is created when the MSOL user is licensed for Exchange Online. So the data returned is the mailbox name, and its creation date. Whether a user has logged on or not is irrelevant.

 

To get the MSOL user creation date:

 

Get-MsolUser | Select UserPrincipalName, WhenCreated

 

and to CSV

 

Get-MsolUser | Select UserPrincipalName, WhenCreated | Export-CSV C:\Temp\MSOLcreation.csv

If I have misunderstood what you need, or you need different info, let me know,

 

 

LYB

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...