[help] I have a Script to search psts on all our computers but….

it only uses the C: drive i need the Script to search all drives including mapped drive. Here is the Script.

Get-Content computers.txt | %{Get-ChildItem "\$_c$" -Include *.pst -Recurse} | Select Name,Directory,Length,LastAccessTime,LastWriteTime,CreationTime | Export-Csv C:resultsPSTfiles.csv -NoTypeInformation 

as you can see the “{Get-ChildItem “$_c$”” is only search the the c Drive. Read somewhere that someone suggested:

Specify your drive list and then use a foreach loop.

But i am not sure how to do that. some help would be much appreciated.

submitted by /u/Tucsontime
[link] [comments]

Leave a Reply