Created
March 13, 2015 14:27
-
-
Save vhusker/412f1017daefa442c932 to your computer and use it in GitHub Desktop.
Get combined desktop size of all users on a Terminal Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This can definitely be condensed into a line or two but this is a good illustration of the way I worked my way through this task | |
$DesktopFolders = Get-ChildItem -Path C:\Users\*\Desktop -Recurse | |
$DesktopFoldersSize = $DesktopFolders | Measure-Object -Property Length -Sum | |
$DesktopFolderSize | |
Count : 16072 | |
Average : | |
Sum : 22536515116 | |
Maximum : | |
Minimum : | |
Property : Length | |
($DesktopFolderSize.Sum)/1GB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment