Wfile.writeln(strcomputer & " " & objFile.Drive & objFile.Path & " " & objFile.FileName & "." & objFile.Extension & " " & objFile.FileSize)
Next
Sorry.
Thanks
Retrieving Computer Names from a Text File
http://www.microsoft.com/technet/scriptcenter/resources/tales/sg1102.mspx
Found this. I set it up so that it also gets the computer name and writes to a file. Test it out and let me know if it doesn't work.
How Can I Get a List of All the .PST Files on a Computer?
http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr05/hey0408.mspx
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * from CIM_DataFile Where Extension = 'pst'")
Set fso = CreateObject("Scripting.FileSystemObject")
set wfile = fso.opentextfile("c:\test.csv",2,true)
For Each objFile in colFilesWfile.writeln(strcomputer & " " & objFile.Drive & objFile.Path & " " & objFile.FileName & "." & objFile.Extension & " " & objFile.FileSize)Next
From: exchangelist-bounce@xxxxxxxxxxxxx [mailto:exchangelist-bounce@xxxxxxxxxxxxx] On Behalf Of Tom Kern
Sent: Thursday, September 14, 2006 1:53 PM
To: exchangelist@xxxxxxxxxxxxx
Subject: [ExchangeList] Re: PST script
Thanks.
It works pretty well.
I'm just making my way around VBscript so any help on how to modify the script to read in a text file of pc names and spit out the result path info to a diff text file would be great.
I don't suppose there is anyway to get the name of the pc in the path info as well?
Thanks. You've been a great help!
On 9/14/06, ChongJa@xxxxxxxxxxxxxxxx <ChongJa@xxxxxxxxxxxxxxxx > wrote:
Test it out, on a few computers and if it's something you can work with, I'll help you to pipe out the additional info, pc name, dir path.
From: exchangelist-bounce@xxxxxxxxxxxxx [mailto:exchangelist-bounce@xxxxxxxxxxxxx] On Behalf Of Chong, James
Sent: Thursday, September 14, 2006 1:16 PM
To: exchangelist@xxxxxxxxxxxxx
Subject: [ExchangeList] Re: PST script
Use something like this from MS scriptcenter. Pipe the results to a text file. In order for you to search your network, you must execute this script to read in a text file of all your computers in your network.
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
http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct04/hey1014.mspx
From: exchangelist-bounce@xxxxxxxxxxxxx [mailto:exchangelist-bounce@xxxxxxxxxxxxx] On Behalf Of Tom Kern
Sent: Thursday, September 14, 2006 12:44 PM
To: ExchangeList
Subject: [ExchangeList] PST script
Does anyone know of a script or free utility which can scan every pc on your network for PST files and just dump out the pc name,dir path to each pst it finds to a text file?
My manager wants to have a listing of all pst files our users have on the network.
This includes pst's dumped locally as well as one's in their networked home dir.
Thanks alot.