From Svendsen Tech PowerShell Wiki
Jump to: navigation, search
Get-FolderSize.ps1.txt(file size: 10 KB, MIME type: text/plain)
Warning: This file type may contain malicious code. By executing it, your system may be compromised.

The actual Get-FolderSize script code.

File history

Click on a date/time to view the file as it appeared at that time.

current14:03, 31 August 2017 (10 KB)Wikiroot (talk | contribs)v1.2.1. Same as GetSTFolderSize module except the function name is Get-FolderSize. Resolve-Path and UNC paths should now work.
15:40, 1 May 2017 (9 KB)Wikiroot (talk | contribs)v1.1. Same as module now (just one line changed).
16:16, 20 May 2016 (9 KB)Wikiroot (talk | contribs)Added -RoboThreadCount. 16 threads gave faster results than the default 8 on my 4 core rig.
13:04, 19 May 2016 (8 KB)Wikiroot (talk | contribs)Documentation fixes.
12:53, 19 May 2016 (8 KB)Wikiroot (talk | contribs)Added the -ComOnly switch parameter.
05:04, 23 February 2016 (7 KB)Wikiroot (talk | contribs)More regex tweaking. Changed int64 to decimal to support larger sizes since someone apparently has _very_ large data storage units. Changed "time elapsed" to also respect the -Precision (default 4), and print 0.nnnn seconds.
06:02, 22 February 2016 (7 KB)Wikiroot (talk | contribs)Changed a few \s+ to \s* to support larger byte sizes, and to be more flexible. Should probably have done it in the first place. We'll see if there will be further refinement.
05:36, 19 February 2016 (7 KB)Wikiroot (talk | contribs)Added catching a PERMISSIONDENIED exception, and falling back to robocopy also then. Not sure why I haven't seen this before. Noticed it on a 2012 R2 server.
12:14, 4 February 2016 (6 KB)Wikiroot (talk | contribs)Fixed a logic error related to handling "ended time" in the robocopy part of the functions.
00:39, 4 February 2016 (7 KB)Wikiroot (talk | contribs)Updating to a version that uses COM first and then falls back to robocopy if access is denied to one or more files or directories (then COM returns $null).
15:11, 26 January 2015 (4 KB)Wikiroot (talk | contribs)Using [math]::Round() instead of .ToString() on MB and GB, even though those fields were meant to be readable and the bytes field was meant for math operations. Shrug.
14:31, 26 January 2015 (4 KB)Wikiroot (talk | contribs)Added begin and process blocks to make it cmdlet-compliant. Cast a bunch of stuff to numbers to make it possible to sort.
20:25, 25 January 2015 (3 KB)Wikiroot (talk | contribs)Improved support for different datetime formats seen on Windows 7 / Server 2008 R2, in the "EndedTime" string in the robocopy summary. Now handles it gracefully for my test computers. English is still a requirement for the actual output text.
15:59, 25 January 2015 (2 KB)Wikiroot (talk | contribs)The actual Get-FolderSize script code.
  • You cannot overwrite this file.

The following page links to this file: