Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ignoreWords": [
"msstore",
"choco",
"Chocolately's",
"Chocolatey",
"sarif",
"psscriptanalyzer",
"JDHIT",
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

# Powershell files
# PowerShell files
[*.{ps1,psd1,psm1}]
indent_size = 4

Expand Down
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Please note there is a code of conduct, please follow it in all your interaction

## Contributing via Pull Requests

Please contribute pull requests to the `test` branch of this repository. If you're not sure how, feel free to reach out and ask!
Please contribute pull requests against the `main` branch of this repository. If you're not sure how, feel free to reach out and ask!

## Code of Conduct

This project has a [Code of Conduct](CODE_OF_CONDUCT.md).

## Licensing

See the [LICENSE](LICENSE) file for our project's licensing.
See the [LICENSE](../LICENSE) file for our project's licensing.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

- [ ] 🕵️ I have reviewed my code for errors and tested it.
- [ ] 🚩 My pull request does not contain multiple types of changes.
- [ ] 📄 By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license.
- [ ] 📄 By submitting this pull request, I confirm that my contribution is made under the terms of the project's associated license.
6 changes: 3 additions & 3 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

If you discover a vulnerability in **The Cleaners**, please follow the _following process_:

1. Open a generic bug issue advising you have discovered a vulnerability.
- Avoid sharing specifics or details of the vulnerability in an open GitHub issue.
2. A repo owner will reach out to you to establish a private form of communication.
1. Report the vulnerability privately through GitHub's private vulnerability reporting or security advisory workflow.
- Do not share specifics or details of the vulnerability in an open GitHub issue.
2. A repo owner will review the report and may follow up privately for more information.
3. We will evaluate the vulnerability and, if necessary, release a fix or mitigating steps to address it. We will contact you to let you know the outcome, and will credit you in the report.

Please **do not disclose the vulnerability publicly** until a fix is released!
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly

- package-ecosystem: pip
directory: /docs
schedule:
interval: weekly
5 changes: 2 additions & 3 deletions .github/workflows/Deploy MkDocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
paths:
- 'docs/**'
- '.github/workflows/Deploy MkDocs.yml'
- '.github/mkdocs.yml'
- 'mkdocs.yml'

# Allow manual triggering of the workflow.
workflow_dispatch:
Expand All @@ -19,7 +19,6 @@ jobs:
build:
permissions:
contents: write
pull-requests: write

runs-on: ubuntu-latest
concurrency:
Expand All @@ -38,7 +37,7 @@ jobs:
- name: ➕ Install Dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
python -m pip install -r docs/requirements.txt

- name: 👷‍♂️ Build & Deploy MkDocs
run: |
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Publish to PowerShell Gallery
on:
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -9,5 +13,6 @@ jobs:
uses: actions/checkout@v4
- name: Publish PowerShell Module
shell: pwsh
run: |
./publish.ps1 -PSGalleryApiKey ${{ secrets.POWERSHELLGALLERY_KEY }}
env:
PSGALLERY_API_KEY: ${{ secrets.POWERSHELLGALLERY_KEY }}
run: ./.github/workflows/publish.ps1 -PSGalleryApiKey $env:PSGALLERY_API_KEY
26 changes: 22 additions & 4 deletions .github/workflows/publish.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
param (
[string] $PSGalleryApiKey
<#
.SYNOPSIS
Publish TheCleaners to the PowerShell Gallery.

.DESCRIPTION
Publishes the module from the source module path to the PowerShell Gallery
using an API key supplied by the workflow environment.

.PARAMETER PSGalleryApiKey
The PowerShell Gallery API key used by Publish-Module.

.EXAMPLE
./.github/workflows/publish.ps1 -PSGalleryApiKey $env:PSGALLERY_API_KEY
#>
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]
$PSGalleryApiKey
)

$ErrorActionPreference = 'stop'
$ErrorActionPreference = 'Stop'
$ModulePath = './src/TheCleaners'

Publish-Module -Path $ModulePath -NuGetApiKey $PSGalleryApiKey
Publish-Module -Path $ModulePath -NuGetApiKey $PSGalleryApiKey -ErrorAction Stop
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Project Files #
Archive
Artifacts
src/Archive/
src/Artifacts/
cov.xml
coverage.xml
Ignore
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build:
python: "3.12"

mkdocs:
configuration: .github/mkdocs.yml
configuration: mkdocs.yml

python:
install:
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Sam Erde

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![GitHub stars](https://img.shields.io/github/stars/samerde/TheCleaners?cacheSeconds=3600)](https://github.com/samerde/TheCleaners/stargazers/)
![PowerShell Gallery Version](https://img.shields.io/powershellgallery/v/TheCleaners?include_prereleases)
![PowerShell Gallery Downloads](https://img.shields.io/powershellgallery/dt/TheCleaners)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
[![GitHub contributors](https://img.shields.io/github/contributors/samerde/TheCleaners.svg)](https://github.com/samerde/TheCleaners/graphs/contributors/)

![GitHub top language](https://img.shields.io/github/languages/top/SamErde/TheCleaners)
Expand All @@ -13,7 +13,7 @@
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/SamErde/TheCleaners/.github%2Fworkflows%2FDeploy%20MkDocs.yml?label=MkDocs)
<!-- badges-end -->

<img src="https://raw.githubusercontent.com/SamErde/TheCleaners/main/media/TheCleaners-CodeHoodieNoBG.png" width="400" />
<img src="https://raw.githubusercontent.com/SamErde/TheCleaners/main/media/TheCleaners-CodeHoodieNoBG.png" alt="The Cleaners logo on a code hoodie" width="400" />

## Synopsis

Expand Down Expand Up @@ -49,7 +49,7 @@ Install-Module -Name TheCleaners -AllowPrerelease

### Quick Start

#### Example1
#### Example 1

```powershell
# See what jobs TheCleaners can do for you.
Expand Down
13 changes: 6 additions & 7 deletions actions_bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
# https://docs.microsoft.com/powershell/module/packagemanagement/get-packageprovider
Get-PackageProvider -Name Nuget -ForceBootstrap | Out-Null

# https://docs.microsoft.com/powershell/module/powershellget/set-psrepository
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

# List of PowerShell Modules required for the build
$modulesToInstall = New-Object System.Collections.Generic.List[object]
# https://github.com/pester/Pester
Expand Down Expand Up @@ -36,14 +33,16 @@ foreach ($module in $modulesToInstall) {
Name = $module.ModuleName
RequiredVersion = $module.ModuleVersion
Repository = 'PSGallery'
SkipPublisherCheck = $true
Scope = 'CurrentUser'
Force = $true
ErrorAction = 'Stop'
}
try {
if ($module.ModuleName -eq 'Pester' -and ($IsWindows -or $PSVersionTable.PSVersion -ge [version]'5.1')) {
# special case for Pester certificate mismatch with older Pester versions - https://github.com/pester/Pester/issues/2389
# this only affects windows builds
$isWindowsPowerShell = $PSVersionTable.PSEdition -eq 'Desktop'
$isWindowsHost = $isWindowsPowerShell -or ($PSVersionTable.PSVersion.Major -ge 6 -and $IsWindows)
if ($module.ModuleName -eq 'Pester' -and $isWindowsHost) {
# Pester 5.6.1 has a known publisher certificate mismatch on Windows.
# Keep the bypass scoped to this one dependency until the pinned version changes.
Install-Module @installSplat -SkipPublisherCheck
} else {
Install-Module @installSplat
Expand Down
2 changes: 1 addition & 1 deletion docs/Clear-OldIISLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ each web site.
Otherwise, it checks the assumed default log folder location and the registry for the IIS
log file location.

To Do: Add a summary of which blocks were run and possibly a count of log files removed.
Future enhancements may add a summary of which locations were processed and how many log files were removed.

## RELATED LINKS
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![GitHub stars](https://img.shields.io/github/stars/samerde/TheCleaners?cacheSeconds=3600)](https://github.com/samerde/TheCleaners/stargazers/)
![PowerShell Gallery Version](https://img.shields.io/powershellgallery/v/TheCleaners?include_prereleases)
![PowerShell Gallery Downloads](https://img.shields.io/powershellgallery/dt/TheCleaners)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
[![GitHub contributors](https://img.shields.io/github/contributors/samerde/TheCleaners.svg)](https://github.com/samerde/TheCleaners/graphs/contributors/)

![GitHub top language](https://img.shields.io/github/languages/top/SamErde/TheCleaners)
Expand All @@ -13,7 +13,7 @@
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/SamErde/TheCleaners/.github%2Fworkflows%2FDeploy%20MkDocs.yml?label=MkDocs)
<!-- badges-end -->

<img src="https://raw.githubusercontent.com/SamErde/TheCleaners/main/media/TheCleaners-CodeHoodieNoBG.png" width="400" />
<img src="https://raw.githubusercontent.com/SamErde/TheCleaners/main/media/TheCleaners-CodeHoodieNoBG.png" alt="The Cleaners logo on a code hoodie" width="400" />

## Synopsis

Expand Down Expand Up @@ -49,7 +49,7 @@ Install-Module -Name TheCleaners -AllowPrerelease

### Quick Start

#### Example1
#### Example 1

```powershell
# See what jobs TheCleaners can do for you.
Expand Down
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ nav:
- Home: "index.md"
- Functions:
- "Start-Cleaning": "Start-Cleaning.md"
- "Clear-OldExchangeLogs": "Clear-OldExchangeLogs.md"
- "Clear-OldIISLogs": "Clear-OldIISLogs.md"
- "Clear-UserTemp": "Clear-UserTemp.md"
- "Clear-OldExchangeLog": "Clear-OldExchangeLog.md"
- "Clear-OldIISLog": "Clear-OldIISLog.md"
- "Clear-CurrentUserTemp": "Clear-CurrentUserTemp.md"
- "Clear-WindowsTemp": "Clear-WindowsTemp.md"
- "Get-StaleUserProfile": "Get-StaleUserProfile.md"

Expand Down
Binary file removed src/Archive/TheCleaners_0.0.15_20250311.031804.zip
Binary file not shown.
20 changes: 0 additions & 20 deletions src/Artifacts/Invoke-TheCleaners.ps1

This file was deleted.

Loading
Loading