Wondered if some genius could help me out here! :)
I've put together a command that will give me a list of mailboxes in a particular OU, and to list by DisplayName, WhenCreated & LastLogon.
If I run the following command it displays fine on-screen:
Get-Mailbox -resultsize unlimited -OrganizationalUnit "domain.com/Applications/Mail/Contacts and Mailboxes/com/domain" | ft DisplayName,WhenCreated,@{e={ ((Get-MailboxStatistics $_.name).Lastlogontime)};l='Last Logon Time'} -Autosize
However, if I add the export-csv command, it only populates the CSV with a bunch of HEX numbers.
Get-Mailbox -resultsize unlimited -OrganizationalUnit "domain.com/Applications/Mail/Contacts and Mailboxes/com/domain" | ft DisplayName,WhenCreated,@{e={ ((Get-MailboxStatistics $_.name).Lastlogontime)};l='Last Logon Time'} -Autosize | export-csv c:\mailboxlist.csv
Any ideas?
Thanks in advance.
Mike.