{"id":2485,"date":"2014-06-30T08:00:41","date_gmt":"2014-06-30T06:00:41","guid":{"rendered":"http:\/\/www.razumny.no\/?p=2485"},"modified":"2026-07-08T19:12:03","modified_gmt":"2026-07-08T17:12:03","slug":"list-user-home-folder-size","status":"publish","type":"post","link":"https:\/\/www.razumny.no\/?p=2485","title":{"rendered":"List user home folder size"},"content":{"rendered":"<p>Users\u00a0tend to store all kinds of crud on their network home folders, which can be a constant source of frustration for SysAdmins. Luckily, it is fairly easy to\u00a0get a list of the size of each folder, using a Powershell script. The script has already been made for us. It\u00a0is discussed in detail <a href=\"https:\/\/devblogs.microsoft.com\/scripting\/getting-directory-sizes-in-powershell\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>, and can be downloaded from here. You\u00a0could do this from your local computer, or by remote desktop to the remote computer. The procedure is the same.<\/p>\n<ol>\n<ol>\n<ol>\n<li>Open\u00a0File Explorer<\/li>\n<li>Navigate to the root folder for home folders<\/li>\n<li>Copy the script to that folder<\/li>\n<li>Start Powershell\u00a0using an account that has the necessary (typically an admin account)<\/li>\n<li>In Powershell, Navigate to the root folder for home folders<\/li>\n<li>Run the script, using this command:\u00a0<code>.\\Get-DirStats.ps1 &gt;&gt; c:\\users\\XXXX\\Desktop\\List.txt<\/code><\/li>\n<\/ol>\n<\/ol>\n<\/ol>\n<p>(Replace XXXX with your user folder)<\/p>\n<p>The output is a list of all user folders, by name. To sort it, simply import it to Excel.<\/p>\n<p>The folder size is listed in Bytes. To get around this, simply divide them all by 1073741824 (individually, of course).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Users\u00a0tend to store all kinds of crud on their network home folders, which can be a constant source of frustration for SysAdmins. Luckily, it is fairly easy to\u00a0get a list of the size of each folder, using a Powershell script. The script has already been made for us. It\u00a0is discussed in detail here, and can [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[615],"tags":[969],"class_list":["post-2485","post","type-post","status-publish","format-standard","hentry","category-how-to-2","tag-powershell"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p2ukSU-E5","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":6996,"url":"https:\/\/www.razumny.no\/?p=6996","url_meta":{"origin":2485,"position":0},"title":"PowerShell: &#8220;Some or all identity references could not be translated&#8221;","author":"Aleksander Nordgarden-R\u00f8dner","date":"05\/12\/2022","format":false,"excerpt":"For a whole host of reasons we use scripts to create access controlled file shares, and to create the Active Directory groups that control access to them. Not only is it easier than doing it manually, it also ensures that the group is created in the correct place, that permissions\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/www.razumny.no\/?cat=820"},"img":{"alt_text":"Picture of text:\n\nRetry-Command: Some or all identity references could not be translated.\nAt C:\\Scripts\\Opprette-Styrtomr\u00e5de.ps1:113 char:1\n+ Retry-Command -ScriptBlock {\n+\n+ CategoryInfo\n+ FullyQualified Error Id: Microsoft.\n: NotSpecified: (:) [Write-Error], WriteError Exception\nPowerShell.Commands.WriteError Exception, Retry-Command","src":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-107.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-107.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-107.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5500,"url":"https:\/\/www.razumny.no\/?p=5500","url_meta":{"origin":2485,"position":1},"title":"PowerShell: Check Remote Computer Disk Capacity","author":"Aleksander Nordgarden-R\u00f8dner","date":"15\/06\/2020","format":false,"excerpt":"From time to time, I get tickets where one of many possible root causes may be a full disk. While accessing this information over RDP is often an option, it is rather more intrusive than needed. What's more, I usually don't have access to access file servers over RDP. Enter\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-25.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-25.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-25.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-25.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5201,"url":"https:\/\/www.razumny.no\/?p=5201","url_meta":{"origin":2485,"position":2},"title":"How to run a PowerShell script","author":"Aleksander Nordgarden-R\u00f8dner","date":"24\/06\/2019","format":false,"excerpt":"As has been the case so many times before, this week I'm bringing you the direct result of a customer request. The customer in question needed to know how to run a .ps1 script. As you may or may not know, double-clicking the script defaults to editing the script. At\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"Screenshot of Windows Start Menu with Windows PowerShell in search results","src":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4297,"url":"https:\/\/www.razumny.no\/?p=4297","url_meta":{"origin":2485,"position":3},"title":"Powershell: Exporting Active Directory Contacts","author":"Aleksander Nordgarden-R\u00f8dner","date":"16\/10\/2017","format":false,"excerpt":"Some time ago, I needed to have a list of all Contacts registered in Active Directory. Knowing that there are a lot of them (numbering at least eighty), getting the data manually was not a viable alternative, particularly knowing that the same objective can be achieved through Powershell. I eventually\u2026","rel":"","context":"In &quot;code examples&quot;","block_context":{"text":"code examples","link":"https:\/\/www.razumny.no\/?cat=119"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5265,"url":"https:\/\/www.razumny.no\/?p=5265","url_meta":{"origin":2485,"position":4},"title":"Building a script to find all members of a given group","author":"Aleksander Nordgarden-R\u00f8dner","date":"09\/09\/2019","format":false,"excerpt":"Some time ago, I was asked to provide a list of everyone with access to a specific system. After communicating with the client, it transpired that they were particularly interested in knowing who were the members of a set of Active Directory groups. While this can be done manually, I\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6301,"url":"https:\/\/www.razumny.no\/?p=6301","url_meta":{"origin":2485,"position":5},"title":"Finding the full OU path of an AD OU","author":"Aleksander Nordgarden-R\u00f8dner","date":"22\/02\/2021","format":false,"excerpt":"Using PowerShell, I was building a script to identify a subset of the groups in a given organizational unit (OU). As you may know, these are built up of subsections with the prefixes CN (common name) and DC (Domain Component). In order to have the script run successfully, you need\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/2485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2485"}],"version-history":[{"count":3,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/2485\/revisions"}],"predecessor-version":[{"id":7388,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/2485\/revisions\/7388"}],"wp:attachment":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}