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.

samiurrahiman mohd
samiurrahiman mohd used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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
samiurrahiman mohdSr.Engineer-Server Management Messaging Expert

Author

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
Make sure you are also adding the following parameters,

-SendEmail -MailFrom exchangereports@exchangeserverpro.net -MailTo alan.reid@exchangeserverpro.net -MailServer smtp.exchangeserverpro.net
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

samiurrahiman mohdSr.Engineer-Server Management Messaging Expert

Author

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 Expert

Author

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 Expert

Author

Commented:
As expected, it's working fine.

Thanks-Sami

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial