Script for calculating password expiry date

Khalnayak
Tera Guru

Hi,

I need to setup password expiry notifications for users whose password are about to expire 10, 7, 4, 3 and 2 days before.

So I have setup the event, and notification, but I need help with the script in the scheduled script execution.

I have a field u_password_last_set which has the date the password was last set.

find_real_file.png

The AD password expires 60 days after it has been set. So I need a script which will work out the date 90 days after and send notifications 10 days before that, or work out date 80 days after and send notification then.

The same will need to be done for 7.4.3 and 2 days before expiry.

Please can someone help with this.

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

why not use flow designer to send reminder email

refer below links for help

Approval Reminder for Approval Records using flow designer

Approval Reminder Notification for Change records using flow designer

Regards
Ankur

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Hi,

update as this

Use something like this

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Thanks, I tried that but not getting any results now

find_real_file.png

are you able to see records for that

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

it's working now thank you!

Hi Usmaan

what did you do to correct the issue?

 

Thanks