Ice-Breaker has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use Win32::OLE('in'); use constant bFlagReturnImmediately => 0x10; use constant bFlagForwardOnly => 0x20; #use warnings; use Win32::OLE::Enum; my $comp = "."; my $oWMIService_ = Win32::OLE->GetObject( "winmgmts:impersonationLevel +=impersonate}!\\\\$comp\\ROOT\\MicrosoftExchangeV2") or die "problem" +; my $colItems_ = $oWMIService_->ExecQuery ( "Select * from Exchange_Lin +k", "WQL", bFlagReturnImmediately | bFlagForwardOnly); foreach my $objItem_ (in $colItems_){ print $objItem_->{StateRemote}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WMI query Exchange Server with Perl
by Anonymous Monk on Dec 17, 2012 at 15:07 UTC | |
by arnaud99 (Beadle) on Dec 17, 2012 at 17:21 UTC | |
by Ice-Breaker (Novice) on Dec 17, 2012 at 15:23 UTC | |
by BrowserUk (Patriarch) on Dec 17, 2012 at 16:08 UTC |