Skip to content

Repository files navigation

The Cleaners

GitHub stars PowerShell Gallery Version PowerShell Gallery Downloads PRs Welcome GitHub contributors

GitHub top language Codacy Badge GitHub Actions Workflow Status GitHub Actions Workflow Status

The Cleaners logo on a code hoodie

Purpose

A PowerShell module for Windows temporary-file maintenance, IIS and Exchange log discovery, and stale-profile discovery. IIS and Exchange are preview-only, with no deletion implementation in the 1.0 preparation work.

The published 0.0.15-beta package is a prerelease, not a production-ready 1.0 release. This branch continues 1.0 preparation and may contain documentation changes made after the packaged source. Follow the implementation ledger and migration guide.

Requirements

Windows PowerShell 5.1 is the minimum. The 1.0 policy also includes Microsoft-supported PowerShell 7 releases on Windows. Linux and macOS are not supported. Product-specific Windows/IIS/Exchange acceptance remains tracked in the support matrix.

Installation and development

Install the published 0.0.15-beta prerelease from PowerShell Gallery:

Install-Module -Name TheCleaners -Repository PSGallery -RequiredVersion '0.0.15-beta' -AllowPrerelease

To evaluate a checked-out development branch instead, import that source explicitly in an isolated test environment:

Import-Module -Name .\src\TheCleaners\TheCleaners.psd1 -Force
Get-TheCleaners -NoLogo

Import is quiet. Start-Cleaning remains a deprecated alias for Get-TheCleaners; neither command starts cleanup.

Preview first

Clear-CurrentUserTemp -Days 30 -WhatIf -PassThru
Clear-WindowsTemp -Days 30 -RemoveEmptyDirectory -WhatIf -PassThru
Clear-OldIISLog -Days 60 -WhatIf -PassThru
Clear-OldExchangeLog -Days 60 -WhatIf -PassThru

The temp cleaners leave directories untouched unless -RemoveEmptyDirectory is explicit. Even then, they only prune directories emptied by that invocation and their now-empty ancestors. They preserve roots, unrelated empty branches, recent files, and reparse points. Removal-enabled temp runs use standard -Confirm behavior; read the safety contract before executing them.

IIS and Exchange require explicit -WhatIf and cannot remove anything. Their discovered candidates are experimental, not proven deletion allowlists. -AllowRemoval is only a provisional later-release design for Exchange, not an available parameter.

About

PowerShell module to clean the loose ends from your Windows Servers.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

9 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages