An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# Powershell commands

![Banner](./banner.svg)

> 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 |