Re: Easy Way to View and Sort By Folder Sizes
Beggars can't be choosers. Sent from my iPhone On Nov 10, 2011, at 10:42 AM, John Hornbuckle john.hornbuc...@taylor.k12.fl.us wrote: We use folder redirection here, and I’m trying to get a handle on which users have the most stuff. So we have something like: x:\path\user1 x:\path\user2 x:\path\user3 and so on. I’d like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: x:\path\user3500 MB x:\path\user1200 MB x:\path\user2100 MB What’s the easiest way to do this? I’ll need specifics (e.g., don’t tell me I can do it with PS unless you’re gonna tell me precisely how). :) John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
Re: Easy Way to View and Sort By Folder Sizes
Omni DiskSweeper does an excellent job for this type of work. http://www.omnigroup.com/products/omnidisksweeper/ Point it to the drive you want to size and it will scan through directories to get size information. On Thu, Nov 10, 2011 at 7:42 AM, John Hornbuckle john.hornbuc...@taylor.k12.fl.us wrote: We use folder redirection here, and I’m trying to get a handle on which users have the most stuff. So we have something like: x:\path\user1 x:\path\user2 x:\path\user3 and so on. I’d like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: x:\path\user3 500 MB x:\path\user1 200 MB x:\path\user2 100 MB What’s the easiest way to do this? I’ll need specifics (e.g., don’t tell me I can do it with PS unless you’re gonna tell me precisely how). :) John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin -- -- Michael S. White mswhite...@gmail.com ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
RE: Easy Way to View and Sort By Folder Sizes
That's apparently a Mac only application.. John W. Cook System Administrator Partnership For Strong Families 5950 NW 1st Place Gainesville, Fl 32607 Office (352) 244-1610 Cell (352) 215-6944 MCSE, MCP+I, MCTS, CompTIA A+, N+, VSP4, VTSP4 -Original Message- From: Michael White [mailto:mswhite...@gmail.com] Sent: Thursday, November 10, 2011 11:26 AM To: NT System Admin Issues Subject: Re: Easy Way to View and Sort By Folder Sizes Omni DiskSweeper does an excellent job for this type of work. http://www.omnigroup.com/products/omnidisksweeper/ Point it to the drive you want to size and it will scan through directories to get size information. On Thu, Nov 10, 2011 at 7:42 AM, John Hornbuckle john.hornbuc...@taylor.k12.fl.us wrote: We use folder redirection here, and I'm trying to get a handle on which users have the most stuff. So we have something like: x:\path\user1 x:\path\user2 x:\path\user3 and so on. I'd like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: x:\path\user3500 MB x:\path\user1200 MB x:\path\user2100 MB What's the easiest way to do this? I'll need specifics (e.g., don't tell me I can do it with PS unless you're gonna tell me precisely how). :) John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin -- -- Michael S. White mswhite...@gmail.com ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin CONFIDENTIALITY STATEMENT: The information transmitted, or contained or attached to or with this Notice is intended only for the person or entity to which it is addressed and may contain Protected Health Information (PHI), confidential and/or privileged material. Any review, transmission, dissemination, or other use of, and taking any action in reliance upon this information by persons or entities other than the intended recipient without the express written consent of the sender are prohibited. This information may be protected by the Health Insurance Portability and Accountability Act of 1996 (HIPAA), and other Federal and Florida laws. Improper or unauthorized use or disclosure of this information could result in civil and/or criminal penalties. Consider the environment. Please don't print this e-mail unless you really need to. ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
Re: Easy Way to View and Sort By Folder Sizes
+1 Also, if you can find it, diruse.exe from one of the older RKs is still useful. Kurt On Thu, Nov 10, 2011 at 07:56, David Lum david@nwea.org wrote: Windirstat. Free and no install required. From: Rankin, James R [mailto:kz2...@googlemail.com] Sent: Thursday, November 10, 2011 7:47 AM To: NT System Admin Issues Subject: Re: Easy Way to View and Sort By Folder Sizes Treesize? Sent from my SR-71 Blackbird From: John Hornbuckle john.hornbuc...@taylor.k12.fl.us Date: Thu, 10 Nov 2011 10:42:16 -0500 To: NT System Admin Issuesntsysadmin@lyris.sunbelt-software.com ReplyTo: NT System Admin Issues ntsysadmin@lyris.sunbelt-software.com Subject: Easy Way to View and Sort By Folder Sizes We use folder redirection here, and I’m trying to get a handle on which users have the most stuff. So we have something like: x:\path\user1 x:\path\user2 x:\path\user3 and so on. I’d like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: x:\path\user3 500 MB x:\path\user1 200 MB x:\path\user2 100 MB What’s the easiest way to do this? I’ll need specifics (e.g., don’t tell me I can do it with PS unless you’re gonna tell me precisely how). :) John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
RE: Easy Way to View and Sort By Folder Sizes
I wrote this for someone here (well, on some mailing list, I think it was this one) a couple months ago, but I use it all the time now. -get-foldersize.ps1- function Get-FolderSize( $path = $home ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } Get-FolderSize $args -get-foldersize.ps1- Example: PS C:\Scripts .\Get-FolderSize.ps1 c:\windows Path TotalSize - C:\windows\ADAM 3.6 MB C:\windows\ADWS 0.7 MB C:\windows\AppCompat 0.1 MB C:\windows\AppPatch 10.4 MB C:\windows\assembly 2436.4 MB C:\windows\Boot 19.7 MB C:\windows\Branding 2.2 MB C:\windows\CSC 0.0 MB C:\windows\Cursors 0.1 MB C:\windows\debug 8.6 MB C:\windows\diagnostics 1.0 MB C:\windows\DigitalLocker 0.0 MB C:\windows\Downloaded Installations 4.9 MB C:\windows\Downloaded Program Files 19.7 MB C:\windows\Driver Cache 0.3 MB C:\windows\en0.1 MB C:\windows\en-US 0.1 MB C:\windows\Fonts 376.1 MB C:\windows\Globalization 9.6 MB C:\windows\Help 68.1 MB C:\windows\idmu 0.3 MB C:\windows\IME 136.8 MB .. Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] Sent: Thursday, November 10, 2011 10:42 AM To: NT System Admin Issues Subject: Easy Way to View and Sort By Folder Sizes We use folder redirection here, and I'm trying to get a handle on which users have the most stuff. So we have something like: x:\path\user1 x:\path\user2 x:\path\user3 and so on. I'd like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: x:\path\user3500 MB x:\path\user1200 MB x:\path\user2100 MB What's the easiest way to do this? I'll need specifics (e.g., don't tell me I can do it with PS unless you're gonna tell me precisely how). :) John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.commailto:listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
Re: Easy Way to View and Sort By Folder Sizes
Nice, MBS * * *ASB* *http://XeeMe.com/AndrewBaker* *Harnessing the Advantages of Technology for the SMB market… * On Thu, Nov 10, 2011 at 1:41 PM, Michael B. Smith mich...@smithcons.comwrote: I wrote this for someone here (well, on some mailing list, I think it was this one) a couple months ago, but I use it all the time now. ** ** -get-foldersize.ps1- function Get-FolderSize( $path = $home ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } ** ** Get-FolderSize $args -get-foldersize.ps1- ** ** Example: ** ** PS C:\Scripts .\Get-FolderSize.ps1 c:\windows ** ** Path TotalSize - C:\windows\ADAM 3.6 MB C:\windows\ADWS 0.7 MB C:\windows\AppCompat 0.1 MB C:\windows\AppPatch 10.4 MB C:\windows\assembly 2436.4 MB C:\windows\Boot 19.7 MB C:\windows\Branding 2.2 MB C:\windows\CSC 0.0 MB C:\windows\Cursors 0.1 MB C:\windows\debug 8.6 MB C:\windows\diagnostics 1.0 MB C:\windows\DigitalLocker 0.0 MB C:\windows\Downloaded Installations 4.9 MB C:\windows\Downloaded Program Files 19.7 MB C:\windows\Driver Cache 0.3 MB C:\windows\en 0.1 MB C:\windows\en-US 0.1 MB C:\windows\Fonts 376.1 MB C:\windows\Globalization 9.6 MB C:\windows\Help 68.1 MB C:\windows\idmu 0.3 MB C:\windows\IME 136.8 MB …… ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] *Sent:* Thursday, November 10, 2011 10:42 AM *To:* NT System Admin Issues *Subject:* Easy Way to View and Sort By Folder Sizes ** ** We use folder redirection here, and I’m trying to get a handle on which users have the most stuff. ** ** So we have something like: ** ** x:\path\user1 x:\path\user2 x:\path\user3 ** ** and so on. ** ** I’d like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: ** ** x:\path\user3500 MB x:\path\user1200 MB x:\path\user2100 MB ** ** What’s the easiest way to do this? ** ** I’ll need specifics (e.g., don’t tell me I can do it with PS unless you’re gonna tell me precisely how). ** ** :) ** ** ** ** ** ** John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ** ** ** ** ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
Re: Easy Way to View and Sort By Folder Sizes
Another vote here for Treesize. Despite how much as I enjoy writing code, or using CLI tools like 'du', Treesize is great. http://www.jam-software.com/freeware/index.shtml --Steve On Thu, Nov 10, 2011 at 10:47 AM, Rankin, James R kz2...@googlemail.com wrote: Treesize? Sent from my SR-71 Blackbird From: John Hornbuckle john.hornbuc...@taylor.k12.fl.us Date: Thu, 10 Nov 2011 10:42:16 -0500 To: NT System Admin Issuesntsysadmin@lyris.sunbelt-software.com ReplyTo: NT System Admin Issues ntsysadmin@lyris.sunbelt-software.com Subject: Easy Way to View and Sort By Folder Sizes We use folder redirection here, and I’m trying to get a handle on which users have the most stuff. So we have something like: x:\path\user1 x:\path\user2 x:\path\user3 and so on. I’d like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: x:\path\user3 500 MB x:\path\user1 200 MB x:\path\user2 100 MB What’s the easiest way to do this? I’ll need specifics (e.g., don’t tell me I can do it with PS unless you’re gonna tell me precisely how). :) John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
RE: Easy Way to View and Sort By Folder Sizes
Can you tell a PS novice how to get this to sort by size? That would make it perfect. John From: Michael B. Smith [mailto:mich...@smithcons.com] Sent: Thursday, November 10, 2011 1:41 PM To: NT System Admin Issues Subject: RE: Easy Way to View and Sort By Folder Sizes I wrote this for someone here (well, on some mailing list, I think it was this one) a couple months ago, but I use it all the time now. -get-foldersize.ps1- function Get-FolderSize( $path = $home ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } Get-FolderSize $args -get-foldersize.ps1- Example: PS C:\Scripts .\Get-FolderSize.ps1 c:\windows Path TotalSize - C:\windows\ADAM 3.6 MB C:\windows\ADWS 0.7 MB C:\windows\AppCompat 0.1 MB C:\windows\AppPatch 10.4 MB C:\windows\assembly 2436.4 MB C:\windows\Boot 19.7 MB C:\windows\Branding 2.2 MB C:\windows\CSC 0.0 MB C:\windows\Cursors 0.1 MB C:\windows\debug 8.6 MB C:\windows\diagnostics 1.0 MB C:\windows\DigitalLocker 0.0 MB C:\windows\Downloaded Installations 4.9 MB C:\windows\Downloaded Program Files 19.7 MB C:\windows\Driver Cache 0.3 MB C:\windows\en0.1 MB C:\windows\en-US 0.1 MB C:\windows\Fonts 376.1 MB C:\windows\Globalization 9.6 MB C:\windows\Help 68.1 MB C:\windows\idmu 0.3 MB C:\windows\IME 136.8 MB .. Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us]mailto:[mailto:john.hornbuc...@taylor.k12.fl.us] Sent: Thursday, November 10, 2011 10:42 AM To: NT System Admin Issues Subject: Easy Way to View and Sort By Folder Sizes We use folder redirection here, and I'm trying to get a handle on which users have the most stuff. So we have something like: x:\path\user1 x:\path\user2 x:\path\user3 and so on. I'd like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: x:\path\user3500 MB x:\path\user1200 MB x:\path\user2100 MB What's the easiest way to do this? I'll need specifics (e.g., don't tell me I can do it with PS unless you're gonna tell me precisely how). :) John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.commailto:listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.commailto:listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~
Re: Easy Way to View and Sort By Folder Sizes
Only drawback is the free version don't do network drives. I'm sold on it, but from now on I am using MBS' PS script to look like a scripting whiz :-) Sent from my SR-71 Blackbird -Original Message- From: Steve Kradel skra...@zetetic.net Date: Thu, 10 Nov 2011 14:24:49 To: NT System Admin Issuesntsysadmin@lyris.sunbelt-software.com Reply-To: NT System Admin Issues ntsysadmin@lyris.sunbelt-software.comSubject: Re: Easy Way to View and Sort By Folder Sizes Another vote here for Treesize. Despite how much as I enjoy writing code, or using CLI tools like 'du', Treesize is great. http://www.jam-software.com/freeware/index.shtml --Steve On Thu, Nov 10, 2011 at 10:47 AM, Rankin, James R kz2...@googlemail.com wrote: Treesize? Sent from my SR-71 Blackbird From: John Hornbuckle john.hornbuc...@taylor.k12.fl.us Date: Thu, 10 Nov 2011 10:42:16 -0500 To: NT System Admin Issuesntsysadmin@lyris.sunbelt-software.com ReplyTo: NT System Admin Issues ntsysadmin@lyris.sunbelt-software.com Subject: Easy Way to View and Sort By Folder Sizes We use folder redirection here, and I’m trying to get a handle on which users have the most stuff. So we have something like: x:\path\user1 x:\path\user2 x:\path\user3 and so on. I’d like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: x:\path\user3 500 MB x:\path\user1 200 MB x:\path\user2 100 MB What’s the easiest way to do this? I’ll need specifics (e.g., don’t tell me I can do it with PS unless you’re gonna tell me precisely how). :) John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
Re: Easy Way to View and Sort By Folder Sizes
$a = get-foldersize $a | get-member TypeName: Selected.System.Int32 NameMemberType Definition -- -- Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() ToStringMethod string ToString() PathNoteProperty System.String Path=P:\Desktop TotalSize NoteProperty System.Double TotalSize=25.3 MB $a | sort TotalSize or Get-folderSize | Sort TotalSize Steven Peck http://www.blkmtn.org On Thu, Nov 10, 2011 at 12:34 PM, John Hornbuckle john.hornbuc...@taylor.k12.fl.us wrote: Can you tell a PS novice how to get this to sort by size? That would make it perfect. ** ** ** ** John ** ** *From:* Michael B. Smith [mailto:mich...@smithcons.com] *Sent:* Thursday, November 10, 2011 1:41 PM *To:* NT System Admin Issues *Subject:* RE: Easy Way to View and Sort By Folder Sizes ** ** I wrote this for someone here (well, on some mailing list, I think it was this one) a couple months ago, but I use it all the time now. ** ** -get-foldersize.ps1- function Get-FolderSize( $path = $home ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } ** ** Get-FolderSize $args -get-foldersize.ps1- ** ** Example: ** ** PS C:\Scripts .\Get-FolderSize.ps1 c:\windows ** ** Path TotalSize - C:\windows\ADAM 3.6 MB C:\windows\ADWS 0.7 MB C:\windows\AppCompat 0.1 MB C:\windows\AppPatch 10.4 MB C:\windows\assembly 2436.4 MB C:\windows\Boot 19.7 MB C:\windows\Branding 2.2 MB C:\windows\CSC 0.0 MB C:\windows\Cursors 0.1 MB C:\windows\debug 8.6 MB C:\windows\diagnostics 1.0 MB C:\windows\DigitalLocker 0.0 MB C:\windows\Downloaded Installations 4.9 MB C:\windows\Downloaded Program Files 19.7 MB C:\windows\Driver Cache 0.3 MB C:\windows\en 0.1 MB C:\windows\en-US 0.1 MB C:\windows\Fonts 376.1 MB C:\windows\Globalization 9.6 MB C:\windows\Help 68.1 MB C:\windows\idmu 0.3 MB C:\windows\IME 136.8 MB …… ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] *Sent:* Thursday, November 10, 2011 10:42 AM *To:* NT System Admin Issues *Subject:* Easy Way to View and Sort By Folder Sizes ** ** We use folder redirection here, and I’m trying to get a handle on which users have the most stuff. ** ** So we have something like: ** ** x:\path\user1 x:\path\user2 x:\path\user3 ** ** and so on. ** ** I’d like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: ** ** x:\path\user3500 MB x:\path\user1200 MB x:\path\user2100 MB ** ** What’s the easiest way to do this? ** ** I’ll need specifics (e.g., don’t tell me I can do it with PS unless you’re gonna tell me precisely how). ** ** :) ** ** ** ** ** ** John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ** ** ** ** ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a
RE: Easy Way to View and Sort By Folder Sizes
Steven's solution is arguably better than mine. :) -get-foldersize.ps1- Param( [string]$path = $home, [switch]$sortBySize ) function Get-FolderSize( $path ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } if( $sortBySize ) { Get-FolderSize $path | sort -Property TotalSize } else { Get-FolderSize $path } -get-foldersize.ps1- Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] Sent: Thursday, November 10, 2011 3:35 PM To: NT System Admin Issues Subject: RE: Easy Way to View and Sort By Folder Sizes Can you tell a PS novice how to get this to sort by size? That would make it perfect. John From: Michael B. Smith [mailto:mich...@smithcons.com]mailto:[mailto:mich...@smithcons.com] Sent: Thursday, November 10, 2011 1:41 PM To: NT System Admin Issues Subject: RE: Easy Way to View and Sort By Folder Sizes I wrote this for someone here (well, on some mailing list, I think it was this one) a couple months ago, but I use it all the time now. -get-foldersize.ps1- function Get-FolderSize( $path = $home ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } Get-FolderSize $args -get-foldersize.ps1- Example: PS C:\Scripts .\Get-FolderSize.ps1 c:\windows Path TotalSize - C:\windows\ADAM 3.6 MB C:\windows\ADWS 0.7 MB C:\windows\AppCompat 0.1 MB C:\windows\AppPatch 10.4 MB C:\windows\assembly 2436.4 MB C:\windows\Boot 19.7 MB C:\windows\Branding 2.2 MB C:\windows\CSC 0.0 MB C:\windows\Cursors 0.1 MB C:\windows\debug 8.6 MB C:\windows\diagnostics 1.0 MB C:\windows\DigitalLocker 0.0 MB C:\windows\Downloaded Installations 4.9 MB C:\windows\Downloaded Program Files 19.7 MB C:\windows\Driver Cache 0.3 MB C:\windows\en0.1 MB C:\windows\en-US 0.1 MB C:\windows\Fonts 376.1 MB C:\windows\Globalization 9.6 MB C:\windows\Help 68.1 MB C:\windows\idmu 0.3 MB C:\windows\IME 136.8 MB .. Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com From: John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us]mailto:[mailto:john.hornbuc...@taylor.k12.fl.us] Sent: Thursday, November 10, 2011 10:42 AM To: NT
Re: Easy Way to View and Sort By Folder Sizes
+1 for windirstat (does do network drives). On Thu, Nov 10, 2011 at 3:55 PM, Steven Peck sep...@gmail.com wrote: $a = get-foldersize $a | get-member TypeName: Selected.System.Int32 NameMemberType Definition -- -- Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() ToStringMethod string ToString() PathNoteProperty System.String Path=P:\Desktop TotalSize NoteProperty System.Double TotalSize=25.3 MB $a | sort TotalSize or Get-folderSize | Sort TotalSize Steven Peck http://www.blkmtn.org On Thu, Nov 10, 2011 at 12:34 PM, John Hornbuckle john.hornbuc...@taylor.k12.fl.us wrote: Can you tell a PS novice how to get this to sort by size? That would make it perfect. ** ** ** ** John ** ** *From:* Michael B. Smith [mailto:mich...@smithcons.com] *Sent:* Thursday, November 10, 2011 1:41 PM *To:* NT System Admin Issues *Subject:* RE: Easy Way to View and Sort By Folder Sizes ** ** I wrote this for someone here (well, on some mailing list, I think it was this one) a couple months ago, but I use it all the time now. ** ** -get-foldersize.ps1- function Get-FolderSize( $path = $home ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } ** ** Get-FolderSize $args -get-foldersize.ps1- ** ** Example: ** ** PS C:\Scripts .\Get-FolderSize.ps1 c:\windows ** ** Path TotalSize - C:\windows\ADAM 3.6 MB C:\windows\ADWS 0.7 MB C:\windows\AppCompat 0.1 MB C:\windows\AppPatch 10.4 MB C:\windows\assembly 2436.4 MB C:\windows\Boot 19.7 MB C:\windows\Branding 2.2 MB C:\windows\CSC 0.0 MB C:\windows\Cursors 0.1 MB C:\windows\debug 8.6 MB C:\windows\diagnostics 1.0 MB C:\windows\DigitalLocker 0.0 MB C:\windows\Downloaded Installations 4.9 MB C:\windows\Downloaded Program Files 19.7 MB C:\windows\Driver Cache 0.3 MB C:\windows\en 0.1 MB C:\windows\en-US 0.1 MB C:\windows\Fonts 376.1 MB C:\windows\Globalization 9.6 MB C:\windows\Help 68.1 MB C:\windows\idmu 0.3 MB C:\windows\IME 136.8 MB …… ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com http://theessentialexchange.com/ ** ** *From:* John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] *Sent:* Thursday, November 10, 2011 10:42 AM *To:* NT System Admin Issues *Subject:* Easy Way to View and Sort By Folder Sizes ** ** We use folder redirection here, and I’m trying to get a handle on which users have the most stuff. ** ** So we have something like: ** ** x:\path\user1 x:\path\user2 x:\path\user3 ** ** and so on. ** ** I’d like to look at x:\path and sort all the folders in it by size, displaying the size in MB. So the results would be something like: ** ** x:\path\user3500 MB x:\path\user1200 MB x:\path\user2100 MB ** ** What’s the easiest way to do this? ** ** I’ll need specifics (e.g., don’t tell me I can do it with PS unless you’re gonna tell me precisely how). ** ** :) ** ** ** ** ** ** John Hornbuckle, MSMIS, PMP MIS Department Taylor County School District www.taylor.k12.fl.us ** ** ** ** ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here:
Re: Easy Way to View and Sort By Folder Sizes
Well, mine was the seriously lazy use what's there method. It's not like I created anything, just discovered and leveraged what was there :) On Thu, Nov 10, 2011 at 1:03 PM, Michael B. Smith mich...@smithcons.comwrote: Steven’s solution is arguably better than mine. J ** ** -get-foldersize.ps1- Param( [string]$path = $home, [switch]$sortBySize ) ** ** function Get-FolderSize( $path ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } ** ** if( $sortBySize ) { Get-FolderSize $path | sort -Property TotalSize } else { Get-FolderSize $path } -get-foldersize.ps1- ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] *Sent:* Thursday, November 10, 2011 3:35 PM *To:* NT System Admin Issues *Subject:* RE: Easy Way to View and Sort By Folder Sizes ** ** Can you tell a PS novice how to get this to sort by size? That would make it perfect. ** ** ** ** John ** ** *From:* Michael B. Smith [mailto:mich...@smithcons.com] *Sent:* Thursday, November 10, 2011 1:41 PM *To:* NT System Admin Issues *Subject:* RE: Easy Way to View and Sort By Folder Sizes ** ** I wrote this for someone here (well, on some mailing list, I think it was this one) a couple months ago, but I use it all the time now. ** ** -get-foldersize.ps1- function Get-FolderSize( $path = $home ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } ** ** Get-FolderSize $args -get-foldersize.ps1- ** ** Example: ** ** PS C:\Scripts .\Get-FolderSize.ps1 c:\windows ** ** Path TotalSize - C:\windows\ADAM 3.6 MB C:\windows\ADWS 0.7 MB C:\windows\AppCompat 0.1 MB C:\windows\AppPatch 10.4 MB C:\windows\assembly 2436.4 MB C:\windows\Boot 19.7 MB C:\windows\Branding 2.2 MB C:\windows\CSC 0.0 MB C:\windows\Cursors 0.1 MB C:\windows\debug 8.6 MB C:\windows\diagnostics 1.0 MB C:\windows\DigitalLocker 0.0 MB C:\windows\Downloaded Installations 4.9 MB C:\windows\Downloaded Program Files 19.7 MB C:\windows\Driver Cache 0.3 MB C:\windows\en 0.1 MB C:\windows\en-US 0.1 MB C:\windows\Fonts 376.1 MB C:\windows\Globalization 9.6 MB C:\windows\Help 68.1 MB C:\windows\idmu 0.3 MB C:\windows\IME 136.8 MB …… ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] *Sent:* Thursday, November 10, 2011 10:42 AM *To:* NT System Admin Issues *Subject:* Easy Way to View and Sort By Folder Sizes ** ** We use folder redirection here, and I’m trying to get a handle on which users have the most stuff. ** ** So we have something like: ** **
Re: Easy Way to View and Sort By Folder Sizes
Just use WinDirStat and be done with it, unless you're trying to script this. On Thu, Nov 10, 2011 at 5:09 PM, Steven Peck sep...@gmail.com wrote: Well, mine was the seriously lazy use what's there method. It's not like I created anything, just discovered and leveraged what was there :) On Thu, Nov 10, 2011 at 1:03 PM, Michael B. Smith mich...@smithcons.comwrote: Steven’s solution is arguably better than mine. J ** ** -get-foldersize.ps1- Param( [string]$path = $home, [switch]$sortBySize ) ** ** function Get-FolderSize( $path ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } ** ** if( $sortBySize ) { Get-FolderSize $path | sort -Property TotalSize } else { Get-FolderSize $path } -get-foldersize.ps1- ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] *Sent:* Thursday, November 10, 2011 3:35 PM *To:* NT System Admin Issues *Subject:* RE: Easy Way to View and Sort By Folder Sizes ** ** Can you tell a PS novice how to get this to sort by size? That would make it perfect. ** ** ** ** John ** ** *From:* Michael B. Smith [mailto:mich...@smithcons.com] *Sent:* Thursday, November 10, 2011 1:41 PM *To:* NT System Admin Issues *Subject:* RE: Easy Way to View and Sort By Folder Sizes ** ** I wrote this for someone here (well, on some mailing list, I think it was this one) a couple months ago, but I use it all the time now. ** ** -get-foldersize.ps1- function Get-FolderSize( $path = $home ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } ** ** Get-FolderSize $args -get-foldersize.ps1- ** ** Example: ** ** PS C:\Scripts .\Get-FolderSize.ps1 c:\windows ** ** Path TotalSize - C:\windows\ADAM 3.6 MB C:\windows\ADWS 0.7 MB C:\windows\AppCompat 0.1 MB C:\windows\AppPatch 10.4 MB C:\windows\assembly 2436.4 MB C:\windows\Boot 19.7 MB C:\windows\Branding 2.2 MB C:\windows\CSC 0.0 MB C:\windows\Cursors 0.1 MB C:\windows\debug 8.6 MB C:\windows\diagnostics 1.0 MB C:\windows\DigitalLocker 0.0 MB C:\windows\Downloaded Installations 4.9 MB C:\windows\Downloaded Program Files 19.7 MB C:\windows\Driver Cache 0.3 MB C:\windows\en 0.1 MB C:\windows\en-US 0.1 MB C:\windows\Fonts 376.1 MB C:\windows\Globalization 9.6 MB C:\windows\Help 68.1 MB C:\windows\idmu 0.3 MB C:\windows\IME 136.8 MB …… ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] *Sent:* Thursday, November 10, 2011 10:42 AM *To:* NT System Admin Issues *Subject:* Easy Way to View and Sort By Folder Sizes ** ** We
Re: Easy Way to View and Sort By Folder Sizes
On Thu, Nov 10, 2011 at 10:56 AM, David Lum david@nwea.org wrote: Windirstat. Free and no install required. +1. For visualizing what's using space, it can't be beat. It also tends to things like folder full of way too many itty bitty files and that guy has way too many PowerPoint files stand out visually. Useless for analysis over time, but when you're trying to just wrap your head around the current storage picture, it's ideal. -- Ben ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/ ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to listmana...@lyris.sunbeltsoftware.com with the body: unsubscribe ntsysadmin
Re: Easy Way to View and Sort By Folder Sizes
For 2 AM calls, I use scanner.exe as it's just an executable. http://www.steffengerlach.de/freeware/ As to using a utility vs adding to your scripting library, it depends on your goal. Adding to your scripting library is useful in technique and flexibility. There is nothing wrong with windirstat, just sometimes, a quick script fulfills your needs and has the advantage of just being there already. In the end, either set of tools works. Steven Peck http://www.blkmtn.org On Thu, Nov 10, 2011 at 2:54 PM, Cynicalgeek cynicalg...@gmail.com wrote: Just use WinDirStat and be done with it, unless you're trying to script this. On Thu, Nov 10, 2011 at 5:09 PM, Steven Peck sep...@gmail.com wrote: Well, mine was the seriously lazy use what's there method. It's not like I created anything, just discovered and leveraged what was there :) On Thu, Nov 10, 2011 at 1:03 PM, Michael B. Smith mich...@smithcons.comwrote: Steven’s solution is arguably better than mine. J ** ** -get-foldersize.ps1- Param( [string]$path = $home, [switch]$sortBySize ) ** ** function Get-FolderSize( $path ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } ** ** if( $sortBySize ) { Get-FolderSize $path | sort -Property TotalSize } else { Get-FolderSize $path } -get-foldersize.ps1- ** ** Regards, ** ** Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com ** ** *From:* John Hornbuckle [mailto:john.hornbuc...@taylor.k12.fl.us] *Sent:* Thursday, November 10, 2011 3:35 PM *To:* NT System Admin Issues *Subject:* RE: Easy Way to View and Sort By Folder Sizes ** ** Can you tell a PS novice how to get this to sort by size? That would make it perfect. ** ** ** ** John ** ** *From:* Michael B. Smith [mailto:mich...@smithcons.com] *Sent:* Thursday, November 10, 2011 1:41 PM *To:* NT System Admin Issues *Subject:* RE: Easy Way to View and Sort By Folder Sizes ** ** I wrote this for someone here (well, on some mailing list, I think it was this one) a couple months ago, but I use it all the time now. ** ** -get-foldersize.ps1- function Get-FolderSize( $path = $home ) { $code = { ('{0:0.0} MB' -f ($this/1MB)) } Get-ChildItem -Path $Path | Where-Object { $_.Length -eq $null } | ForEach-Object { Write-Progress -Activity 'Calculating Total Size for:' -Status $_.FullName $sum = Get-ChildItem $_.FullName -Recurse -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue $bytes = $sum.Sum if ($bytes -eq $null) { $bytes = 0 } $result = 1 | Select-Object -Property Path, TotalSize $result.Path = $_.FullName $result.TotalSize = $bytes | Add-Member -MemberType ScriptMethod -Name toString -Value $code -Force -PassThru $result } } ** ** Get-FolderSize $args -get-foldersize.ps1- ** ** Example: ** ** PS C:\Scripts .\Get-FolderSize.ps1 c:\windows ** ** Path TotalSize - C:\windows\ADAM 3.6 MB C:\windows\ADWS 0.7 MB C:\windows\AppCompat 0.1 MB C:\windows\AppPatch 10.4 MB C:\windows\assembly 2436.4 MB C:\windows\Boot 19.7 MB C:\windows\Branding 2.2 MB C:\windows\CSC 0.0 MB C:\windows\Cursors 0.1 MB C:\windows\debug 8.6 MB C:\windows\diagnostics 1.0 MB C:\windows\DigitalLocker 0.0 MB C:\windows\Downloaded Installations 4.9 MB C:\windows\Downloaded Program Files 19.7 MB C:\windows\Driver Cache 0.3 MB C:\windows\en 0.1 MB