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
Solved

Powershell for Mailbox Statics and applying storage quota by Office

Posted on 2010-09-08
8
1,403 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
  • 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exchange 2013 - Get Public Folder Path 2 26
EXCHANGE 7 36
Exchange ActiveSync 12 16
Steps to Migrate Exchange Server 2010 to 2016 on new hardware 5 16
We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
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.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
This video discusses moving either the default database or any database to a new volume.

839 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