Great that worked like a charm! But it did require a bit of work to make it
look good in Excel, would it be possible to pipe directly to a CSV file?

SJ

On Fri, Sep 24, 2010 at 4:58 PM, Steven Peck <[email protected]> wrote:

> I just tested this and it pulled all my activity off my logs.
>
> PS:\> Get-ChildItem '\\serverName\d$\Research in Motion\BlackBerry
> Enterprise Server\Logs\*' -Recurse -Include PhoneCallLog*.csv |
> Select-String -SimpleMatch -Pattern "Steven Peck"
>
>
> On Fri, Sep 24, 2010 at 1:48 PM, Stefan Jafs <[email protected]>wrote:
>
>> Thanks Michael, I'll play with findstr
>>
>> SJ
>>
>>   On Fri, Sep 24, 2010 at 4:40 PM, Michael B. Smith <
>> [email protected]> wrote:
>>
>>>  Oh, this is so much easier using find (Unix version) or findstr
>>> (cmd.exe version). Such as:
>>>
>>>
>>>
>>>                 Cd /d c:\log-file-directory
>>>
>>>                 findstr /i /s /c:”literal-search-string”
>>> PhoneCallLog*.csv
>>>
>>>
>>>
>>> PowerShell would go something like:
>>>
>>>
>>>
>>>                 Get-ChildItem c:\log-file-directory\* -recurse –include
>>> PhoneCallLog*.csv | select-string –simplematch –pattern
>>> “literal-search-string”
>>>
>>>
>>>
>>> You can do a LOT more with the PowerShell command(s), but in this simple
>>> case, cmd.exe is easier to use.
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> Michael B. Smith
>>>
>>> Consultant and Exchange MVP
>>>
>>> http://TheEssentialExchange.com <http://theessentialexchange.com/>
>>>
>>>
>>>
>>> *From:* Stefan Jafs [mailto:[email protected]]
>>> *Sent:* Friday, September 24, 2010 4:26 PM
>>>
>>> *To:* NT System Admin Issues
>>> *Subject:* Re: BES Logs
>>>
>>>
>>>
>>> Any chance you could do a few PS lines for me with the following
>>> conditions:
>>>
>>> Logs Directory each day has a folder with the date (20100923) then the
>>> phone log is PhoneCalllog_20100923.csv, I would just like to search for
>>> particular phone number.
>>>
>>>
>>>
>>> SJ
>>>
>>> On Fri, Sep 24, 2010 at 4:14 PM, Michael B. Smith <[email protected]>
>>> wrote:
>>>
>>> Findstr, grep, awk, sed, PowerShell, WinGrep, etc. etc…. all have
>>> multi-file capabilities.
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> Michael B. Smith
>>>
>>> Consultant and Exchange MVP
>>>
>>> http://TheEssentialExchange.com <http://theessentialexchange.com/>
>>>
>>>
>>>
>>> *From:* Stefan Jafs [mailto:[email protected]]
>>> *Sent:* Friday, September 24, 2010 4:11 PM
>>> *To:* NT System Admin Issues
>>> *Subject:* BES Logs
>>>
>>>
>>>
>>> Running BES 5 and need to find phone activity's for 1 device for the last
>>> 6 months. Is there an easy way or do I have to look at the log files 1 day
>>> at the time? sigh . . . . .
>>>
>>> --
>>> Stefan Jafs
>>>
>>> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
>>> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>>>
>>> ---
>>> To manage subscriptions click here:
>>> http://lyris.sunbelt-software.com/read/my_forums/
>>> or send an email to [email protected]
>>> with the body: unsubscribe ntsysadmin
>>>
>>> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
>>> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>>>
>>> ---
>>> To manage subscriptions click here:
>>> http://lyris.sunbelt-software.com/read/my_forums/
>>> or send an email to [email protected]
>>> with the body: unsubscribe ntsysadmin
>>>
>>>
>>>
>>>
>>> --
>>> Stefan Jafs
>>>
>>> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
>>> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>>>
>>> ---
>>> To manage subscriptions click here:
>>> http://lyris.sunbelt-software.com/read/my_forums/
>>> or send an email to [email protected]
>>> with the body: unsubscribe ntsysadmin
>>>
>>> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
>>> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>>>
>>> ---
>>> To manage subscriptions click here:
>>> http://lyris.sunbelt-software.com/read/my_forums/
>>> or send an email to [email protected]
>>> with the body: unsubscribe ntsysadmin
>>>
>>
>>
>>
>> --
>> Stefan Jafs
>>
>> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
>> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>>
>> ---
>> To manage subscriptions click here:
>> http://lyris.sunbelt-software.com/read/my_forums/
>> or send an email to [email protected]
>> with the body: unsubscribe ntsysadmin
>>
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>
> ---
> To manage subscriptions click here:
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to [email protected]
> with the body: unsubscribe ntsysadmin
>



-- 
Stefan Jafs

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

Reply via email to