PowerShell

Just different approach to Active Directory Password Notifications

A long time ago I've maintained a C# version of Password Expiry reminders. It was working based on HTML templates and was quite painful to setup and make sure it's working as expected. Problem with password notifications and setting up something that whole company will potentially get is always risky. You don't want to send 500 emails to all users just because you want to test out if your HTML template is actually looking as you want it to. So when Client asked me to enable password notifications for him I've decided that it's time to start with something new. You can of course find a lot of possible options ranging from few lines scripts, to full blow software but I had few priorities of my own. I've made sure the code is published on GitHub (so you can give feedback / report issues there) but also it's published as a module on PowerShellGallery so highly deployable.

Why and how it's different
No external dependencies on software (something that I would have to maintain or pay for)
Easy to use, highly configurable configuration file (and execution script at the same time)
Stop having to rely on HTML, getting the tags right
Ability to test changes on my email account (to see how users/managers will see it)
Ability to deliver reports to admins about what happens with users
Few others…
Useful links
Code is published on GitHub
Issues should be reported on GitHub
Code is published as a module on PowerShellGallery
Full module description is available at dedicated module page
Template for users

This is how the template for users look like. You can customize it to your needs. It's just an example I've done for testing purposes. You can pick your own links, colors, style and data you want to include in email. The looks is mostly up to you with fairly easy config file.

Template for managers

This is how the template looks for managers. Again it's configurable by you. The only thing that's a bit static is the table in the middle. You can cut out some of the fields from it via config file thou.

Template for Admins

Finally this is how the email to admins looks like. There's no template here except for choosing amount of reports you want to get. My idea is that admins don't need formatting. They need data… so there it is..

If you like what you see feel free to visit the dedicated module page PSPasswordExpiryNotifications which contains all the know-how for it.

This post was last modified on June 10, 2018 13:23

Przemyslaw Klys

System Architect with over 14 years of experience in the IT field. Skilled, among others, in Active Directory, Microsoft Exchange and Office 365. Profoundly interested in PowerShell. Software geek.

Share
Published by
Przemyslaw Klys

Recent Posts

Upgrade Azure Active Directory Connect fails with unexpected error

Today, I made the decision to upgrade my test environment and update the version of…

5 days ago

Mastering Active Directory Hygiene: Automating Stale Computer Cleanup with CleanupMonster

Have you ever looked at your Active Directory and wondered, "Why do I still have…

4 months ago

Active Directory Replication Summary to your Email or Microsoft Teams

Active Directory replication is a critical process that ensures the consistent and up-to-date state of…

8 months ago

Syncing Global Address List (GAL) to personal contacts and between Office 365 tenants with PowerShell

Hey there! Today, I wanted to introduce you to one of the small but excellent…

1 year ago

Active Directory Health Check using Microsoft Entra Connect Health Service

Active Directory (AD) is crucial in managing identities and resources within an organization. Ensuring its…

1 year ago

Seamless HTML Report Creation: Harness the Power of Markdown with PSWriteHTML PowerShell Module

In today's digital age, the ability to create compelling and informative HTML reports and documents…

1 year ago