« Previous Next »

Thread: Please advise?

Last post 04-26-2009 10:21 PM by joelangley. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 04-07-2009, 3:27 PM

    • hg363
    • Top 100 Contributor
    • Joined on 09-04-2007, 3:44 PM
    • Posts 54

    Please advise?

    Hi I found this script on Technet

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
        & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colFiles = objWMIService.ExecQuery _
        ("Select * from CIM_DataFile where Extension = 'mp3'")
    For Each objFile in colFiles
        Wscript.Echo objFile.Name 
    Next
    
    My question is, is it possible to make LP do the same thing and search a remote computer 
    for a particular file and if so would some one kindly show me what the LP query, thank you.
     
  • 04-15-2009, 9:56 AM In reply to

    • Joanner
    • Not Ranked
    • Joined on 04-15-2009, 1:45 PM
    • Posts 6

    Re: Please advise?

    I think it is possible if you will use a RemoteAdmin (and another like remote applications)

  • 04-26-2009, 10:21 PM In reply to

    Re: Please advise?

    Agreed. Logparser does not have this idea built in. You can use remote admin (rexec), sys internals psexec, or wsman and powershell. Powershell would be my suggestion as you can do something like:

    Invoke-Expression -computername atl-fs-001 -command "Get-ChildItem C:\Scripts"
    This would show all files in the folder c:\scripts...having it search for a file or even calling logparser is very doable.
    You can find more here: http://www.microsoft.com/technet/scriptcenter/topics/winpsh/remote.mspx

     

    Check out my blog for other cool tips and tricks:

    http://joelangley.blogspot.com/
Page 1 of 1 (3 items)
Microsoft Communities