Advertisement
PtiTom

SharePoint Migration - Analyse arborescence

Jun 8th, 2016
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Get-ChildItem -Path E:\PathToScan\ -Recurse |`
  2. foreach{
  3. $Item = $_
  4. $Type = $_.Extension
  5. $Path = $_.FullName
  6. $Folder = $_.PSIsContainer
  7. $Size = $_.Length
  8.  
  9. $Path | Select-Object `
  10.     @{n="Name";e={$Item}},`
  11.     @{n="Size";e={$Size}},`
  12.     @{n="filePath";e={$Path}},`
  13.     @{n="Extension";e={if($Folder){"Folder"}else{$Type}}}`
  14. }| Export-Csv E:\ResultFile.csv -NoTypeInformation -Encoding UTF8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement