cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MPonto
Engaged Sweeper
I have searched the Forum and didn't find any reports that would list a particular file. If I missed it please point me in the correct direction.

We have a number of users who were using ".pst" files to archive older emails the can't live without.
I need / want to be able to search the entire desktop for PST files so that we can move them to online archiving. Anybody have such a script / report?

Need to be able to search all local drives and get a report of all .PST files
Sounds simple right.

Thanks
4 REPLIES 4
ErikT
Lansweeper Tech Support
Lansweeper Tech Support

Hi there,

 

Lansweeper has a feature to scan file properties. 

 

Scanning file properties with custom file scanning

 

However, to retrieve properties of files in any directory other than Program Files, Program Files (x86) or the Windows directory, you must submit the exact file path, including the drive.


For performance reasons, file scanning only queries specific file paths. Scanning all files within a folder or listing all files with a specific extension (extension based scanning) is not possible with file scanning, though you could use a deployment package to perform such file searches.

tsconard
Engaged Sweeper III

Good question; I have the same one.  Did you get a proper resolution?  Thanks.

ASismey
Engaged Sweeper III

Hi ,

Not sure what version of Outlook you are using but you could run a script similar to this from - outlook - Registry key to find pst locations? - Stack Overflow , setup a deployment to run on all your assets , saving the data to a shared area , script below saves to desktop??

'****************************Currently attached archives' | Out-File 

$Env:UserProfile\Desktop\ArchiveHistory.txt -append

#NOTE: This launches Outlook if it is not already running.
$Outlook = New-Object -Comobject Outlook.Application
$Namespace = $Outlook.GetNamespace('MAPI')
$Mailboxes = $Namespace.Stores | where {$_.ExchangeStoreType -eq 1} | Select-Object DisplayName
$AttachedArchives = $Namespace.Stores | where {$_.ExchangeStoreType -eq 3} | Select-Object DisplayName,FilePath
$MailBoxes | Out-File -FilePath $Env:UserProfile\Desktop\OutlookMailboxes.txt
$AttachedArchives | Out-File -FilePath $Env:UserProfile\Desktop\OutlookAttachedArchives.txt

'****************************Archive History for Office 2007' | Out-File $Env:UserProfile\Desktop\ArchiveHistory.txt -append

get-item HKCU:\software\Microsoft\Office\12.0\Outlook\Catalog | select -expandProperty property | where {$_ -match '.pst$'} | Out-File $Env:UserProfile\Desktop\ArchiveHistory.txt

'****************************Archive History for Office 2010' | Out-File $Env:UserProfile\Desktop\ArchiveHistory.txt -append

get-item HKCU:\software\Microsoft\Office\14.0\Outlook\Catalog | select -expandProperty property | where {$_ -match '.pst$'} | Out-File $Env:UserProfile\Desktop\ArchiveHistory.txt

'****************************Archive History for Office 2013' | Out-File $Env:UserProfile\Desktop\ArchiveHistory.txt -append

get-item HKCU:\software\Microsoft\Office\15.0\Outlook\Search\Catalog | select -expandProperty property | where {$_ -match '.pst$'} | Out-File $Env:UserProfile\Desktop\ArchiveHistory.txt -append

'****************************Archive History for Office 2016' | Out-File $Env:UserProfile\Desktop\ArchiveHistory.txt -append

get-item HKCU:\software\Microsoft\Office\16.0\Outlook\Search\Catalog | select -expandProperty property | where {$_ -match '.pst$'} | Out-File $Env:UserProfile\Desktop\ArchiveHistory.txt -append

 

tsconard
Engaged Sweeper III

This looks and works great.  I'll figure out the best way to incorporate this into our project.  Thank you.