ncomper
asked on
Audit My Documents Size on Local machines to plan for Folder Redirecttion
Hi All
We are planning to redirect our users My Documents to a file server, however prior to doing this i would like to know how much data we are going to end up with, is there a script that can go out to each PC and report back the size of the my documents folder, 95% of our estate is Windows 7 so mostly concerned with this O/S,
Thanks
We are planning to redirect our users My Documents to a file server, however prior to doing this i would like to know how much data we are going to end up with, is there a script that can go out to each PC and report back the size of the my documents folder, 95% of our estate is Windows 7 so mostly concerned with this O/S,
Thanks
I haven't tested except on a local machine, but should work.
Using PS Remoting...
Using PS Remoting...
$computers = Get-Content computerlist.txt
$scriptblock = {
Get-ChildItem c:\users | Get-ChildItem -filter "documents" |
Get-ChildItem -Recurse -force -ea SilentlyContinue |
Where { !($_.PsIsContainer) } |
Select -expand length |
Measure-Object -Sum |
Select sum
}
Invoke-Command -ComputerName $computers -ScriptBlock $scriptblock | Export-CSV DocumentsSize.csv -notype
ASKER
Thanks, does anything need to be enabled on the remote client machine, it runs on mine OK but not remote PC's (firewall etc is off)
Also is it possible to get the path in export so we know the user?
Thanks
Also is it possible to get the path in export so we know the user?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
http://forums.petri.com/showthread.php?t=43178