Try :

use Win32::OLE qw(in);

# Get item counts and sizes for each mailbox on the target server
#
my $OLECon=
Win32::OLE->GetObject('winmgmts:\\\\localhost\\root\\MicrosoftExchangeV2')
or die "WMI Connection Failed\n";

my $MailBoxes = $OLECon->ExecQuery("Select * From Exchange_Mailbox") or
die "WMI Query Failed!\n";

print
"-------------------------------------------------------------------------------\n";
print "-                             Mailbox Size Report                  
          -\n";
print
"-------------------------------------------------------------------------------\n";
foreach my $mailbox (in $MailBoxes) {
    print "MailboxDisplayName: ......... " . $mailbox->MailboxDisplayName
. "\n" .
                "\tSize: .......... " . $mailbox->Size . "\n" .
                "\tTotalItems: ......... " . $mailbox->TotalItems . "\n" .
                "\tStorageLimitInfo: ......... " . $mailbox->StorageLimitInfo . 
"\n" .
                "\tStoreName: ......... " . $mailbox->StoreName . "\n";
}
print
"-------------------------------------------------------------------------------\n\n";
}

> I am looking to list each user on my exchange server the following: SMTP
> address, Storage Limit setting.
>
> I already have a list that extracts their current mailbox size.  But I
> need to know their limit so I can see if the current Mailbox size is
> greater then.. And send them an email..
>
> Thanks in advance,,,
>
> Leo Durocher
> Network Engineer
>   <<Picture (Metafile)>>
>
>
>
> IMPORTANT NOTICE: This message is intended only for the addressee and may
> contain confidential, privileged information.
> If you are not the intended recipient, you may not use, copy or disclose
> any information contained in the message.
> If you have received this message in error, please notify the sender by
> reply e-mail and delete the message.
> _______________________________________________
> Perl-Win32-Admin mailing list
> Perl-Win32-Admin@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>

_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to