- Description: Retrieves disk space information for a specified drive.
- Parameters:
Name: The drive letter (default is the home drive).SpaceType: Type of space to retrieve (Free,Total, orUsed).Unit: Unit of measurement (GB,MB, orKB).
- Example:
Get-DiskSpace -SpaceType Free -Unit GB
- Description: Removes old files or directories based on their creation time.
- Parameters:
Path: Path to the file or directory.File: File object to remove.Days: Files older than this number of days will be removed.DryRun: If specified, only simulates the removal.
- Example:
Remove-OldItem -Path "C:\Temp\example.txt" -Days 30
- Description: Removes temporary data created by Chromium-based browsers.
- Parameters:
Days: Files older than this number of days will be removed.DryRun: If specified, only simulates the removal.
- Example:
Remove-ChromiumTempData -Days 30 -DryRun
- Description: Deletes crash dump files from the
CrashDumpsfolder. - Parameters:
Days: Files older than this number of days will be removed.DryRun: If specified, only simulates the removal.
- Example:
Remove-CrashDump -Days 7
- Description: Removes logs generated by DebugDiag service.
- Parameters:
Days: Files older than this number of days will be removed.DryRun: If specified, only simulates the removal.
- Example:
Remove-DebugDiagLogs -Days 14
- Description: Deletes IIS log files from the specified folder
- Parameters:
Days: Files older than this number of days will be removed.LogFilesFolder: Path to the IIS log files folder (default is%SystemDrive%\inetpub\logs\LogFiles).DryRun: If specified, only simulates the removal.
- Example:
Remove-IISLog -Days 7
- Description: Removes old versions of a specific NuGet package while always keeping at least the latest version.
- Parameters:
Days: Package versions older than this number of days will be removed.PackageName: Optional package folder name or wildcard under the NuGet root (for examplecms.core.contentorcms.*). When omitted, all packages are processed.NugetFolder: Root NuGet folder (default isC:\nuget).DryRun: If specified, only simulates the removal.
- Example:
Remove-NugetPackageVersion -PackageName 'cms.core.content' -Days 30 -DryRun
Remove-NugetPackageVersion -NugetFolder 'C:\nuget' -Days 30 -DryRun
- Description: Deletes temporary ASP.NET files from the specified folder.
- Parameters:
Days: Files older than this number of days will be removed.FolderPath: Path to the temporary ASP.NET files folder (default is%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root).DryRun: If specified, only simulates the removal.
- Example:
Remove-TempASPNETFile -Days 60