https://github.com/cavo789/powershell_commands
Some useful commands to run in the PowerShell console
https://github.com/cavo789/powershell_commands
powershell utilities
Last synced: 5 months ago
JSON representation
Some useful commands to run in the PowerShell console
- Host: GitHub
- URL: https://github.com/cavo789/powershell_commands
- Owner: cavo789
- License: mit
- Created: 2020-08-14T19:33:38.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-01T21:07:18.000Z (over 3 years ago)
- Last Synced: 2024-08-09T02:19:31.247Z (8 months ago)
- Topics: powershell, utilities
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - cavo789/powershell_commands - Some useful commands to run in the PowerShell console (Others)
README
# Powershell commands

> 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).
```bash
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 |