non-sequitor ....
Let's try and interpret this anyway.  It may help me understand
PowerShell better :)

On Jan 17, 2008 10:23 AM, Campbell, Rob
<[EMAIL PROTECTED]> wrote:
> Something I was messing with last night:

sets $logfile = to a series of text files..... event logs that have
been dumped to text files?  (gci is an alias for get-childitem)
> $logfiles = gci MSGTRK*.log
> foreach ($logfile in $logfiles){

@{} designates an array or a for-each?
> $src_evt_ht = @{}

get the files (gc = get-content) assigned above
> gc $logfile |% {

are you replacing stuff with a comma or breaking at comma's only?
> if ($_ -notmatch "^\#.+$"){
> $rec = $_ -split ","

pull out source and event id's from the file ...
> $source = $rec[7]
> $event_id = $rec[8]
>

combine them and compare to each other and do something
> $src_evt = $source + "." + $event_id
> if ($src_evt_ht.$src_evt){$src_evt_ht.$src_evt =
> [int]$src_evt_ht.$src_evt + 1}
> else {$src_evt_ht.add("$src_evt","1")}
> }
> }

write results to log file...

> $logfile.name
> write-host "`n"
> $src_evt_ht
>
> }

How did I do?

Steven


>
> -----Original Message-----
> From: Michael B. Smith [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 17, 2008 11:15 AM
> To: MS-Exchange Admin Issues
> Subject: RE: Mailbox Count
>
> I'll take that two liner and make it one... ;-)
>
> (gwmi -namespace root\microsoftexchangev2 -class exchange_mailbox
> -computer
> <servername>).Count
>
> Regards,
>
> Michael B. Smith
> MCSE/Exchange MVP
> http://TheEssentialExchange.com
>
>
> -----Original Message-----
> From: Campbell, Rob [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 17, 2008 12:02 PM
> To: MS-Exchange Admin Issues
> Subject: RE: Mailbox Count
>
> Powershell:
>
> $mbxs = gwmi -namespace root\microsoftexchangev2 -class exchange_mailbox
> -computer <servername>
>
> $mbxs.count
>
> -----Original Message-----
> From: John Hornbuckle [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 17, 2008 10:57 AM
> To: MS-Exchange Admin Issues
> Subject: Mailbox Count
>
> I think there's an easy way to do this, but I'm drawing a blank... With
> Exchange 2003, how can I quickly see how many mailboxes I have?
>
>
>
> John Hornbuckle
> MIS Department
> Taylor County School District
> 318 North Clark Street
> Perry, FL 32347
>
> www.taylor.k12.fl.us
>
>
>
>
> ~ Ninja Email Security with Cloudmark Spam Engine Gets Image Spam ~
> ~             http://www.sunbeltsoftware.com/Ninja                ~
>
> ************************************************************************
> ****
> **********************
> Note:
> The information contained in this message may be privileged and
> confidential
> and
> protected from disclosure.  If the reader of this message is not the
> intended
> recipient, or an employee or agent responsible for delivering this
> message
> to
> the intended recipient, you are hereby notified that any dissemination,
>
> distribution or copying of this communication is strictly prohibited. If
> you
>
> have received this communication in error, please notify us immediately
> by
> replying to the message and deleting it from your computer.
> ************************************************************************
> ****
> **********************
>
> ~ Ninja Email Security with Cloudmark Spam Engine Gets Image Spam ~
> ~             http://www.sunbeltsoftware.com/Ninja                ~
>
>
> ~ Ninja Email Security with Cloudmark Spam Engine Gets Image Spam ~
> ~             http://www.sunbeltsoftware.com/Ninja                ~
>
> **************************************************************************************************
> Note:
> The information contained in this message may be privileged and confidential 
> and
> protected from disclosure.  If the reader of this message is not the intended
> recipient, or an employee or agent responsible for delivering this message to
> the intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited. If you
> have received this communication in error, please notify us immediately by
> replying to the message and deleting it from your computer.
> **************************************************************************************************
>
> ~ Ninja Email Security with Cloudmark Spam Engine Gets Image Spam ~
> ~             http://www.sunbeltsoftware.com/Ninja                ~
>

~ Ninja Email Security with Cloudmark Spam Engine Gets Image Spam ~
~             http://www.sunbeltsoftware.com/Ninja                ~

Reply via email to