Open your Windows Powershell ISE and compile these codes or simply copy paste them onto a powershell terminal or execute .ps1 files directly with powershell. To be able to execute this file on Windows Powershell ISE you have to make sure execution policy is unrestricted.To controll how configured your execution policy write
get-executionpolicy
on your console and check if it is unrestricted,restricted or assecurestring.In case it is not unrestricted you have to write
set-executionpolicy Unrestricted
Then voilĂ you will be able to execute it on your Windows Powershell ISE:)