Hello,
would like to know the procedure on how/where to add these scripts ?
You do not need to add the scripts anywhere. You just need to execute them in Windows PowerShell ISE with the required variable values. In case of changing the settings, it needs to be done just once.
I am looking specifically for users who try to change password in self-service portal.
What exactly do you mean?