Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exchange Shell to query User mailbox size

Status
Not open for further replies.

ryrae

MIS
Aug 31, 2004
89
US
I am looking for a script in EMS that will allow me to manually enter a users name to get the current mailbox size. I am working on a HTML page that will allow people in the IT dept. to lookup users mailbox size. right now I have a query where the user will go to the webpage press the "Run Report" button and it will populate all users with mailbox sizes great than or equal to 150MB. I would like the abiltiy to enter a specific user into a dialog box from the HTML page and have it run a report using EMS and populate a HTML page with that specific users' mailbox size. Is this possible?
 
I've put loads of scripts into the Powershell forum FAQ including some about mailbox size - perhaps you could use those with what you've already done to come up with a solution that you could post back?
 
Thanks. That is a great reference. I used the first line of code and modified it...

get-mailboxstatistics %username% |ConvertTo-HTML -Property DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}}, storagelimitstatus, ItemCount > c:\size_report.htm

what I would like to do is setup and HTML code/page that will allow us to enter an individual username into a command box, press the submit button, and push that specific name to the cmdlet, which will then run and produce the output file w/statistics. I was hoping that vbscript or batch file could do the trick, but I am not sure. Any ideas? thanks again for your help.
 
Design your PowerShell script to take an argument first from a command line. When you have that done, you should be able to have an ASP or ASP.Net page call your script with the arguments.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Mark has probably just got back from 3 weeks scuba diving. I'm completely jealous of the amount of diving he does.
 
Sorry, just been super busy at work and trying to get back into the groove of helping out here.

Zelendakh, I won't be diving again until mid March. Going to Isla Mujeres Mexico. :)


I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top