Wean
asked on
Powershell Script to Find certain file extension, path size - need help adding last modified date
Hi All,
I found the folowing PS Script on the web but cant figure out how to add the last modified date to it
could someone help?
I found the folowing PS Script on the web but cant figure out how to add the last modified date to it
could someone help?
$Search = "\\cifs\v7000-cifs\USERVOLUME\"
$Outfile = "C:\SCRIPT\report.csv"
$Files = Dir $Search -recurse -include *.pst,*.ost -EA SilentlyContinue |
select-object Length,name,Fullname,extension | sort-Object extension
$Files | Export-Csv $Outfile -NoTypeInformation
$Files | Group extension -NoElement | % {$Ext = $_.Name;$_ | Select @{N="Extension";E={$_.Name}},Count,`
@{N="SizeMB";E={"{0:N2}" -f (($Files | ?{$_.extension -eq $Ext} | Measure Length -Sum).Sum /1MB)}}} |
ConvertTo-Csv -NoTypeInformation | Out-File $Outfile -Append -Encoding ASCII
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.