Need to get a report for all the mailboxes along with server name,database name,primarysmtp address,Mailbox size report,- mailboxstatistics report,last logo, whencreated details in CSV format.

Hi,

I'm trying to fetch the report using with script "https://gallery.technet.microsoft.com/scriptcenter/Generate-Mailbox-Size-and-3f408172" get-mailboxreport.ps1, however not able to fetch the report whenmailbox created date from this script.

Please suggest me to set the whenmailboxcreated date in report.


Thanks,
Sami
samiurrahiman mohdSr.Engineer-Server Management Messaging ExpertAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sunil ChauhanLead AdministratorCommented:
add this line to the script next to the colum where ever you want this value to be added.

 $userObj | Add-Member NoteProperty -Name WhenMailboxCreated -Value $mb.WhenMailboxCreated

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
samiurrahiman mohdSr.Engineer-Server Management Messaging ExpertAuthor Commented:
Hi Sunil,

I have added the parameter in the script $userObj | Add-Member NoteProperty -Name WhenMailboxCreated -Value $mb.WhenMailboxCreated

Now its able to validate the WhenMailboxCreated for users mailboxes.

One more request : This script is not sending email the CSV from the Mailbox server which resides the MailboxDatabase server. How to activate to send the report via email. Because after execution its not sending/not receiving from the server end. Kindly suggest.

I have defined my email address in the script to send out from the server.


Thanks-Sami
Sunil ChauhanLead AdministratorCommented:
Make sure you are also adding the following parameters,

-SendEmail -MailFrom exchangereports@exchangeserverpro.net -MailTo alan.reid@exchangeserverpro.net -MailServer smtp.exchangeserverpro.net
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

samiurrahiman mohdSr.Engineer-Server Management Messaging ExpertAuthor Commented:
Hi Sunil,

I have added the parameter in the "-SendEmail -MailFrom user1-name@domain.com -MailTo user2-name@domain.com -MailServer smtp.domain.com" in the below bottom of the script. However as expected its not sending email from the server.

Apart from in powershell script, do i need to mention anything in the script?

Please suggest.

Thanks,
Sami
samiurrahiman mohdSr.Engineer-Server Management Messaging ExpertAuthor Commented:
-------Creating a new session for implicit remoting of "Set-ADServerSettings" command.... ---------------
Collecting mailbox list
Collecting report data
Report written to C:\Users\samiur\Desktop\scripts\MailboxReport-20180331-1312.csv in current path.
Sending email report...
[PS] C:\Users\samiur\Desktop\scripts>
------------------------------------------------------------------------------------------------------------------------------------------------
But not receiving email from Exchange Mailbox servers.
samiurrahiman mohdSr.Engineer-Server Management Messaging ExpertAuthor Commented:
As expected, it's working fine.

Thanks-Sami
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.