tag:blogger.com,1999:blog-5697079276195207284.post3602468052483224422..comments2023-10-21T08:25:53.885-07:00Comments on Powershell Scripting: Active Directory: User Password Expiration NoticeShaun Stullhttp://www.blogger.com/profile/07958543131421305230noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-5697079276195207284.post-60543501168416528562021-05-01T10:04:02.065-07:002021-05-01T10:04:02.065-07:00I really liked your Information. Keep up the good ...I really liked your Information. Keep up the good work. <a href="https://nanfor.com/products/curso-oficial-de-especialista-en-bsd-exam-702" rel="nofollow">Curso oficial de Especialista en BSD - Exam 702</a>Glenn Hannanhttps://www.blogger.com/profile/03049840611373273132noreply@blogger.comtag:blogger.com,1999:blog-5697079276195207284.post-28475317330206864922018-06-08T11:24:15.794-07:002018-06-08T11:24:15.794-07:00Very informative article, it provides good informa...Very informative article, it provides good information about active directory user password expiration notification. I tested this AD self service tool i.e., ( <a href="https://www.netwrix.com/password_manager.html?rid=gDd88kwH" rel="nofollow">https://www.netwrix.com/password_manager.html</a>) that helps to send automatic password expiration notification email within given time line and allow users to reset their passwords without any help of Admin or help-desk .james marshhttps://www.blogger.com/profile/01833270635462770884noreply@blogger.comtag:blogger.com,1999:blog-5697079276195207284.post-17719691314533584582014-12-10T02:32:36.973-08:002014-12-10T02:32:36.973-08:00This comment has been removed by the author.Jhon Drakehttps://www.blogger.com/profile/05239343599455109998noreply@blogger.comtag:blogger.com,1999:blog-5697079276195207284.post-30743156379466829002013-02-25T06:54:57.044-08:002013-02-25T06:54:57.044-08:00Also instead of using the $user@yourdomain.com you...Also instead of using the $user@yourdomain.com you could query each user to get the listed email adres for all your users and use the email adres which is actually in Active directory.<br /><br />#Query ADUser to get the E-Mail Adres<br /> $emailadres = Get-ADUser $user -Properties mail<br /> $email = $emailadres.mail<br /><br />then just use the $email in:<br />$emailTo = "$email"Rhulskerhttps://www.blogger.com/profile/01689528384941361731noreply@blogger.comtag:blogger.com,1999:blog-5697079276195207284.post-53933530738211440042013-02-25T06:45:56.936-08:002013-02-25T06:45:56.936-08:00May i suggest the following line to get an accurat...May i suggest the following line to get an accurate read on how many days until password expiration? instead of manually determining the expiration date.<br /><br />$DaysTilExpire = (([datetime]::FromFileTime((Get-ADUser -Identity $user -Properties "msDS-UserPasswordExpiryTimeComputed")."msDS-UserPasswordExpiryTimeComputed"))-(Get-Date)).Days<br /><br />That way the script is much shorter and more accurateRhulskerhttps://www.blogger.com/profile/01689528384941361731noreply@blogger.comtag:blogger.com,1999:blog-5697079276195207284.post-62801091620818517782012-11-21T09:20:35.326-08:002012-11-21T09:20:35.326-08:00Good catch! I will try to get something added to ...Good catch! I will try to get something added to this in the near future to handle the error. Shaun Stullhttps://www.blogger.com/profile/07958543131421305230noreply@blogger.comtag:blogger.com,1999:blog-5697079276195207284.post-48557084088133269892012-10-31T02:30:26.988-07:002012-10-31T02:30:26.988-07:00I think When the password last set is null the scr...I think When the password last set is null the script fails with obj null error.<br />Also Display Name or Name variable would be good for using in the mail body.Evrenhttps://www.blogger.com/profile/04764108150586196181noreply@blogger.com