Have you read this? It's right at the top of the Windows-Server-Powershell section. Technical questions about explanation and correction of commands, advice for PowerShell scripts, and troubleshooting PowerShell-related issues.
Have you even tried to find something that someone has written, and published, before that might meet your requirement -- or that you, with a little bit of work, might tailor to your specific requirements? There are MANY scripts that are free for you to use. All you have to do is look for them. Here are just a few that I found in about 30 seconds:
23313.notify-active-directory-users-about-password-expiry-using-powershell.aspx
a-password-expiration-reminder-script-in-powershell
powershell-notify-users-of-an-upcoming-ad-password-expiry-via-email
powershell-script-for-password-expiry-email-notification.html
password-expiration-email-notification-with-powershell