You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You'll probably get access-denied messages for parts of that path, even if running as Admin. I did a test on my profile in Windows PowerShell.
Get-FolderSizeInfo$home-hidden
My total size is actually about 3GB more than what I get when I use Windows Explorer and look at properties. The same test in PowerShell 7 is closer to the results I see in Windows Explorer. This is on a Windows 11 system. Profile folders are tricky due to hidden files and special access permissions.
Although, there might be an issue with symlinks. In Windows PowerShell, the function follows the link and includes the size information, but not in PowerShell 7, which uses a different .NET method.
Activity
jdhitsolutions commentedon Feb 12, 2024
What version of PowerShell are you using? What path are you querying? Are you including hidden files?
jszabo98 commentedon Feb 12, 2024
Powershell 5.1. c:\users. Including hidden files.
jdhitsolutions commentedon Feb 12, 2024
You'll probably get access-denied messages for parts of that path, even if running as Admin. I did a test on my profile in Windows PowerShell.
My total size is actually about 3GB more than what I get when I use Windows Explorer and look at properties. The same test in PowerShell 7 is closer to the results I see in Windows Explorer. This is on a Windows 11 system. Profile folders are tricky due to hidden files and special access permissions.
Although, there might be an issue with symlinks. In Windows PowerShell, the function follows the link and includes the size information, but not in PowerShell 7, which uses a different .NET method.
jszabo98 commentedon Feb 15, 2024
This suits me, to skip the reparsepoints like the mounted Onedrive ...
$top = ($di.GetDirectories()).Where( { $_.attributes -notmatch 'reparsepoint' })
jdhitsolutions commentedon Feb 15, 2024
Let me see what I can come up with.
jdhitsolutions commentedon May 30, 2024
I have a new version for the next release. I am now skipping all reparse points and junctions.
jdhitsolutions commentedon Jun 6, 2024
v2.49.0 has been published to the PowerShell Gallery if you want to update and test.
jszabo98 commentedon Jun 11, 2024
Looks good. Actually my typical usage is like this, sort of "du | sort -n". It's good for avd, where the disk is slower.
icm comp001 { dir -dir -force C:\programdata\ | Get-FolderSizeInfo.ps1 | sort totalsize } | ft -a