Home / Microsoft / Microsoft DOS / Restarting Collectors
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: Restarting Collectors  (Read 547 times)
CameronY
Topic Starter
Intermediate



Posts: 134


« on: January 21, 2008, 05:17:21 AM »

Hi all,

Has been a while since I've had to look at a dos script, so please excuse my failing skillset (or what's left of it).   :)

If I execute `logman query` on a Windows 2003 Server I get the following ...
Code: [Select]
C:\> logman query

Collection                              Type                          Status
-------------------------------------------------------------------------------
ITNU-W2                                 Counter                       Running
ITNU-W8                                 Counter                       Running
ITNU-QA2                                Counter                       Running
ITNU-W3                                 Counter                       Running
System Overview                      Counter                       Stopped
ITNU-DB2                                Counter                       Running
ITNU-DB1                                Counter                       Running
ITNU-DB8                                Counter                       Running
ITNU-W1                                 Counter                       Running
ITNU-W7                                 Counter                       Running

The command completed successfully.

C:\>
I know how to perform a FOR loop to extract columns 1, 2 & 3.
But how should I script it to exclude lines that do not contain the word `Counter` ??

Sorry for the newbie type question.

Cheers,
Cameron
IP logged
CameronY
Topic Starter
Intermediate



Posts: 134


« Reply #1 on: January 21, 2008, 05:30:50 AM »

Never mind guys ...

Solution was ... `logman query | findstr /C:"Counter" `
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / Restarting Collectors « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.093 seconds with 20 queries.