Generally you edit the powershell script in the powershell ISE or notepad to change your variables and then run the script.

If you want help with the script and powershell I encourage you to make a new topic under the powershell forum:

https://community.spiceworks.com/programming/powershell

Be sure to read