Solved

Powershell for Mailbox Statics and applying storage quota by Office

Posted on 2010-09-08
8
1,408 Views
Last Modified: 2012-05-10
1.  Is there a powershell to get the information of each mailbox by office location and export it to a csv with Name, Office, mailbox size in mb?
2.  Set quota: Issue warning, Prohibitsend by Office

Thanks
0
Comment
Question by:warcraft3dh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 53

Expert Comment

by:Will Szymkowski
ID: 33632756
Prohibit Send = get-mailbox | set-mailbox -prohibitsendquota 500MB

Take a look here for the rest...
http://www.simple-talk.com/sysadmin/powershell/managing-exchange-2007-mailbox-quotas-with-windows-powershell/

Hope this helps~!
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33632774
get-mailbox -organizationalunit contoso.com/ouname | select name,ProhibitSendQuota,ProhibitSendReceiveQuota,IssueWarningQuota,Office |export-csv c:\users.csv

you'll need to run another for the mailbox size
get-mailbox | get-mailboxstatistics | export-csv c:\size.csv
0
 

Author Comment

by:warcraft3dh
ID: 33638896
I'm trying to run this powershell but it keep erroring out:

http://technet.microsoft.com/en-us/library/ff406197(EXCHG.80).aspx

Export storage quota of all mailboxes in an office (using $OfficeName variable)

$OfficeName = "<Office_Name>"get-mailbox -filter {Office -eq $OfficeName } | select name,office, *quota | sort name | export-csv export.csv

Error:
[PS] C:\>$Officename = "Valencia" get-mailbox -filter {office -eq $OfficeName }
|select name, office, *quota | wort name | export-csv office.csv
Unexpected token 'get-mailbox' in expression or statement.
At line:1 char:37
+ $Officename = "Valencia" get-mailbox  <<<< -filter {office -eq $OfficeName }
|select name, office, *quota | wort name | export-csv office.csv
0
Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

 
LVL 32

Expert Comment

by:endital1097
ID: 33638950
to filter the results of mailboxes by office the command is
Get-Mailbox -Filter { Office -eq "Valencia" } |  select name,office, *quota | sort name | export-csv export.csv
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33638966
also you cannot use * with the select statement, it only works with format-list and format-table
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33638973
nevermind, i was thinking of something else
0
 

Author Comment

by:warcraft3dh
ID: 33718504
This powershell works great getting the mailbox information for the office:
Get-Mailbox -Filter { Office -eq "Mission Plaza" } |  select name,office, *quota | sort name | export-csv export.csv

Now I want to implement the Quota size for this office.  I got an error when running this powershell:

Get-Mailbox -Filter { Office -eq "Mission Plaza" } | Set-Mailbox { Office -eq "Mission Plaza" } -UseDatabaseQuotaDefaults:$False -IssueWarningQuota 150 MB -ProhibitSendQuota 200 MB

Error:
Set-Mailbox : A parameter cannot be found that matches parameter name 'Office -eq "Mission Plaza" '.
At line:1 char:65
0
 
LVL 32

Accepted Solution

by:
endital1097 earned 500 total points
ID: 33718534
your get cmdlet filters as needed

Get-Mailbox -Filter { Office -eq "Mission Plaza" } | Set-Mailbox -UseDatabaseQuotaDefaults:$False -IssueWarningQuota 150 MB -ProhibitSendQuota 200 MB

0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Edge Server Subscription 5 23
Fraud Email 22 83
exchange 2007 1 16
exchange 2007, exchange 2010, exchange 2013 9 24
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question