Announcement

Collapse
No announcement yet.

unable to complete the search.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • unable to complete the search.

    Hi All,

    I have downloaded the below script from MS for searching pst on local drivesr, I am geeting error running this script.

    what could be the possible reason for this error I am running it on windows 2003 std R2 server env.

    ERROR =SWbemObjectSet: The remote procedure call failed.

    SCRIPT ==
    Code:
    ========================
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colFiles = objWMIService.ExecQuery _
        ("Select * from CIM_DataFile Where Extension = 'pst'AND Drive = 'D:'")
    If colFiles.Count = 0 Then
        Wscript.Quit
    End If
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objTextFile = objFSO.CreateTextFile("C:\PST_Data.txt")
    For Each objFile in colFiles
        objTextFile.Write(objFile.Drive & objFile.Path & ",")
        objTextFile.Write(objFile.FileName & "." & objFile.Extension & ",")
        objTextFile.Write(objFile.FileSize & vbCrLf)
    Next
    objTextFile.Close
    ==================
    Thanx in advance
    rgds
    Last edited by Dumber; 1st October 2008, 10:43.

  • #2
    Re: unable to complete the search.

    wrapped code tags arround the script.

    Can you post the source?
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      Re: unable to complete the search.

      Hi,

      I really dont know much about scripting. all I know is I am geeting error while running against on my server (win2k3stR2) however the same is running on my machine which is winxpsp2.


      pls help

      Rgds

      Comment

      Working...
      X