Skip to content

Add 180-day deletion for inactive administrator accounts#63

Open
Gumbees wants to merge 1 commit into
mainfrom
enhancement/admin-user-180day-deletion
Open

Add 180-day deletion for inactive administrator accounts#63
Gumbees wants to merge 1 commit into
mainfrom
enhancement/admin-user-180day-deletion

Conversation

@Gumbees

@Gumbees Gumbees commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds 180-day automatic deletion of inactive administrator accounts to msft-win-localuser-cleanup.ps1. Previously the cleanup script left administrators alone; this extends the inactive-account purge to cover admins past the threshold.

Files touched:

  • msft-windows/msft-win-localuser-cleanup.ps1

Test plan

  • Run on a test endpoint with a known-inactive (>180 days) local administrator account and confirm deletion.
  • Run on an endpoint with only active admin accounts and confirm no admin is touched.
  • Verify the script does not delete built-in Administrator or any account currently in use.
  • Spot-check audit logging / event output is informative for RMM consumption.

Lineage

Renamed from feature/admin-user-180day-deletion to enhancement/admin-user-180day-deletion per CLAUDE.md change taxonomy. Part of the stale-branch reconciliation sweep.

- Local administrators now deleted after 180 days of inactivity
- Previously: admins were only disabled, never deleted
- Added $AdminDeletionThresholdDate variable (180 days)
- Admins disabled after $AdminInactivityDays (default 90)
- Admins deleted after 180 days if still disabled
- Updated documentation and interactive mode messages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, push a new commit or reopen this pull request to trigger a review.

@Gumbees Gumbees changed the base branch from main to development May 11, 2026 17:08
@Gumbees Gumbees changed the base branch from development to main June 25, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant