Code Monkey home page Code Monkey logo

Comments (8)

jdhitsolutions avatar jdhitsolutions commented on August 10, 2024 1

I have a new version for the next release. I am now skipping all reparse points and junctions.

from psscripttools.

jdhitsolutions avatar jdhitsolutions commented on August 10, 2024

What version of PowerShell are you using? What path are you querying? Are you including hidden files?

from psscripttools.

jszabo98 avatar jszabo98 commented on August 10, 2024

Powershell 5.1. c:\users. Including hidden files.

from psscripttools.

jdhitsolutions avatar jdhitsolutions commented on August 10, 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.

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.

from psscripttools.

jszabo98 avatar jszabo98 commented on August 10, 2024

This suits me, to skip the reparsepoints like the mounted Onedrive ...

$top = ($di.GetDirectories()).Where( { $_.attributes -notmatch 'reparsepoint' })

from psscripttools.

jdhitsolutions avatar jdhitsolutions commented on August 10, 2024

Let me see what I can come up with.

from psscripttools.

jdhitsolutions avatar jdhitsolutions commented on August 10, 2024

v2.49.0 has been published to the PowerShell Gallery if you want to update and test.

from psscripttools.

jszabo98 avatar jszabo98 commented on August 10, 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

from psscripttools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.