|
| 1 | +# Public Cmdlets |
| 2 | + |
| 3 | +## Common |
| 4 | + |
| 5 | +### `Get-DiskSpace` |
| 6 | +- **Description**: Retrieves disk space information for a specified drive. |
| 7 | +- **Parameters**: |
| 8 | + - `Name`: The drive letter (default is the home drive). |
| 9 | + - `SpaceType`: Type of space to retrieve (`Free`, `Total`, or `Used`). |
| 10 | + - `Unit`: Unit of measurement (`GB`, `MB`, or `KB`). |
| 11 | +- **Example**: |
| 12 | + ```powershell |
| 13 | + Get-DiskSpace -SpaceType Free -Unit GB |
| 14 | + ``` |
| 15 | +
|
| 16 | +### `Remove-OldItem` |
| 17 | +- **Description**: Removes old files or directories based on their creation time. |
| 18 | +- **Parameters**: |
| 19 | + - `Path`: Path to the file or directory. |
| 20 | + - `File`: File object to remove. |
| 21 | + - `Days`: Files older than this number of days will be removed. |
| 22 | + - `DryRun`: If specified, only simulates the removal. |
| 23 | +- **Example**: |
| 24 | + ```powershell |
| 25 | + Remove-OldItem -Path "C:\Temp\example.txt" -Days 30 |
| 26 | + ``` |
| 27 | +## Cleanup |
| 28 | +
|
| 29 | +### `Remove-ChromiumTempData` |
| 30 | +- **Description**: Removes temporary data created by Chromium-based browsers. |
| 31 | +- **Parameters**: |
| 32 | + - `Days`: Files older than this number of days will be removed. |
| 33 | + - `DryRun`: If specified, only simulates the removal. |
| 34 | +- **Example**: |
| 35 | + ```powershell |
| 36 | + Remove-ChromiumTempData -Days 30 -DryRun |
| 37 | + ``` |
| 38 | +
|
| 39 | +### `Remove-CrashDump` |
| 40 | +- **Description**: Deletes crash dump files from the `CrashDumps` folder. |
| 41 | +- **Parameters**: |
| 42 | + - `Days`: Files older than this number of days will be removed. |
| 43 | + - `DryRun`: If specified, only simulates the removal. |
| 44 | +- **Example**: |
| 45 | + ```powershell |
| 46 | + Remove-CrashDump -Days 7 |
| 47 | + ``` |
| 48 | +
|
| 49 | +### `Remove-DebugDiagLogs` |
| 50 | +` |
| 51 | +- **Description**: Removes logs generated by **DebugDiag** service. |
| 52 | +- **Parameters**: |
| 53 | + - `Days`: Files older than this number of days will be removed. |
| 54 | + - `DryRun`: If specified, only simulates the removal. |
| 55 | +- **Example**: |
| 56 | + ```powershell |
| 57 | + Remove-DebugDiagLogs -Days 14 |
| 58 | + ``` |
| 59 | +
|
| 60 | +### `Remove-IISLog` |
| 61 | +` |
| 62 | +- **Description**: Deletes **IIS** log files from the specified folder |
| 63 | +- **Parameters**: |
| 64 | + - `Days`: Files older than this number of days will be removed. |
| 65 | + - `LogFilesFolder`: Path to the IIS log files folder (default is `%SystemDrive%\inetpub\logs\LogFiles`). |
| 66 | + - `DryRun`: If specified, only simulates the removal. |
| 67 | +- **Example**: |
| 68 | + ```powershell |
| 69 | + Remove-IISLog -Days 7 |
| 70 | + ``` |
| 71 | +
|
| 72 | +### `Remove-TempASPNETFile` |
| 73 | +- **Description**: Deletes temporary ASP.NET files from the specified folder. |
| 74 | +- **Parameters**: |
| 75 | + - `Days`: Files older than this number of days will be removed. |
| 76 | + - `FolderPath`: Path to the temporary ASP.NET files folder (default is `%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root`). |
| 77 | + - `DryRun`: If specified, only simulates the removal. |
| 78 | +- **Example**: |
| 79 | + ```powershell |
| 80 | + Remove-TempASPNETFile -Days 60 |
| 81 | + ``` |
0 commit comments