Solved

PowerShell Quota Violation Error

Posted on 2010-08-20
3
1,084 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 40

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 500 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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.
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In this video we show how to create a Distribution Group 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 >>…
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…

740 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