Solved

PowerShell Quota Violation Error

Posted on 2010-08-20
3
1,075 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
3 Comments
 
LVL 38

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

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
In this video we show how to create a User Mailbox 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 >> Mailb…
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

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now