Skip to content

Some useful commands to run in the PowerShell console

License

Notifications You must be signed in to change notification settings

cavo789/powershell_commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Powershell commands

Banner

Some useful commands to run in the PowerShell console

Get list of big files

Run the command below to get a list of the largest files on your disk. Place yourself either at the root of the disk or in a sub-folder to process only that folder (recursively).

gci -r -ErrorAction SilentlyContinue | sort -descending -property length | select -first 10 fullname, @{Name="Megabytes";Expression={[Math]::round($_.length / 1MB, 2)}}

Result:

FullName Megabytes
C:...\binaries\apache\logs\error.log 49952,22
C:...\Apps.ppkg 4527,05
C:...\folder\utils.exe 1330,3
C:...\lib\mysqlserver.lib 1067,64
C:...\backup6.zip 793,71
C:...\lang.psi 714,23
C:...\vendor.exe 700,99
C:...\MigLog.xml 537,53
C:...\backup.jpa 433,29
C:...\backup-cet.jpa 427,76

About

Some useful commands to run in the PowerShell console

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published