Why use this template?
Use this PowerShell template when you need to find enabled users whose password age is within a chosen number of days. It can be previewed in the Builder; Pro access is required to generate it for your own environment.
The template uses ActiveDirectory and requires Directory read access. Output: CSV report. Level: Intermediate. Action: Read-only. Risk: Low.
Review before running
The script remains preview-only until Pro access is enabled. Review it before running it, and test it outside production first. “Read-only” describes the script itself; anything you add around it can still change data.
Preview the script
- Open the template in the PowerShell Builder.
- Review the purpose, requirements, permissions, output and risk.
- Activate Pro when you are ready to generate the full script, then test it outside production.
Pro templates remain previewable before purchase or activation. No tenant connection is required. When you generate a Pro script, only the configuration values needed for that template are sent to Opselith after license validation.Preview Find AD passwords expiring soon →
How to use this result
Use this report to find enabled Active Directory users whose calculated password expiry date falls within the number of days you choose.
When this helps
- Prepare a password-expiration follow-up list before users are affected.
- Review upcoming expirations across users governed by the default domain policy or a fine-grained password policy.
- Export the calculated expiry date and policy source to CSV for helpdesk or identity operations.
How to read the result
- The template starts with the default domain password policy and uses a user's resultant fine-grained password policy when msDS-ResultantPSO is present.
- Users with PasswordNeverExpires, no PasswordLastSet value or a non-expiring MaxPasswordAge are excluded from the normal expiring-soon results.
Things to check
- The report calculates expiry from PasswordLastSet and the applicable MaxPasswordAge. Confirm policy design and exceptions before contacting users or changing accounts.
- A per-user policy lookup can fail for an individual account; the report records that row as an error instead of silently treating it as a valid expiry result.
What to do next: Prioritize the soonest expiry dates, confirm the policy source and user ownership, then use your normal password-notification or support process.
Related tasks
Official references