Forum Discussion
siva N
Aug 10, 2017Copper Contributor
Need to export the multiple child folders size from NAS storage via powershell from my computer
We have the NAS storage and we are all accessing our users profiles and share profiles from the NAS storage. We need to restrict the users profiles size below 500 MB thershold, So is it possible to ...
- Aug 10, 2017
Hi,
You can try this script .
$RootFolder = "E:\Profiles" $paths = Get-ChildItem $RootFolder $FolderList =@() Foreach ( $path in $paths) { $colItems = (Get-ChildItem $path.Fullname -Recurse | Measure-Object -property length -sum) $Folders = "" | Select "Folderpath","SizeinMB" $Folders.Folderpath = $path.Fullname $Folders.SizeinMB = $colItems.sum / 1MB $FolderList+= $Folders $Folders = $null } $FolderList | Export-csv c:\foldersize.csv -NoTypeInformation
Deleted
Sep 15, 2017error