Skip to content

Instantly share code, notes, and snippets.

@davewilson
Created April 16, 2016 04:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davewilson/c3fc8175c7263a52ae9cb55ae811c85a to your computer and use it in GitHub Desktop.
Save davewilson/c3fc8175c7263a52ae9cb55ae811c85a to your computer and use it in GitHub Desktop.
$outputfilepath = "C:\Located-PST.csv"
$searchpath = "SEARTH_PATH"
Get-ChildItem -Force $searchpath -include *.pst -Recurse | Where-Object { ($_.PSIsContainer -eq $false) } | Select-Object Name,Directory,Length | Export-Csv $outputfilepath -NoTypeInformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment