?
Solved

PowerShell Quota Violation Error

Posted on 2010-08-20
3
Medium Priority
?
1,106 Views
Last Modified: 2012-05-10
I am running the following script to collect the number of emails each Exchange 2003 generates.

$Date = get-date -uformat "%Y%m%d"
$outFile = "C:\scripts\get-exchangevolume_$date.csv"
$servers= ‘server01','server02'
$transform = @{  
    1028 = "deliver";  
    1021 = "badmail";  
    1031 = "send";  
    1026 = "fail"}  
$res = Get-WmiObject -Namespace "root\MicrosoftExchangeV2" -computername $servers -Class Exchange_MessageTrackingEntry  |  
    where-object{$_.senderaddress -notmatch "-IS@" -and $_.senderaddress -and $_.senderaddress -notmatch "EX:/"} |  
        %{new-object -TypeName psobject -Property @{
                  eventid = $transform.([int]$_.entrytype);  
            week = get-date([DateTime]::ParseExact($_.timelogged.substring(0,8),"yyyyMMdd", [System.Globalization.CultureInfo]::InvariantCulture)) -uformat %V  
            }  
        } | ?{$_.eventid} |  
        Group-Object week, eventid | %{new-object -typename psobject -property @{week=$_.values[0];eventid=$_.values[1];volume=$_.count}} `
            | Select-Object eventid, volume, week, @{n='Server';e={$servers}}`
            | Sort-Object week | export-csv $outFile -notype


When I run this script I receive an error message of:
Quota violation
At :line:9 char:20
+ $res = Get-WmiObject <<<<  -Namespace "root\MicrosoftExchangeV2" -computername $servers -Class Exchange_MessageTrackingEntry  |  


0
Comment
Question by:jahhan
[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
3 Comments
 
LVL 42

Expert Comment

by:Adam Brown
ID: 33490626
You can only pass one computer at a time to get-wmiobject. Passing an array of strings to get-wmiobject is likely causing that particular error. I haven't really tried to use Powershell to pull information off an Exchange 2k3 server, so I don't think I can help you with the rest, though.
0
 
LVL 6

Accepted Solution

by:
craig_j_Lawrence earned 2000 total points
ID: 33490970
there is also a known issue with large wmi queries to Windows 2003 server as per this article: http://support.microsoft.com/kb/828653

hope this helps
0
 

Author Comment

by:jahhan
ID: 33512667
Is it possible to run the script against multiple arrays in an attempt to reduce the quota violation?
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

719 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