In the management console, under 'Tools > Embedded Scripts' click 'New' and give the script a descriptive name, e.g. 'script_name.ps1' and in the 'Script Content' box add your script
In the 'Interpreter field', select 'powershell.exe -inputformat none -file' from the drop-down and click 'OK'
Under 'System Health Packages', create a new package (assign it accordingly or make it global) and then add an 'Application Scheduler' object to it
Decide on a schedule for the script and select @script_name.ps1 for the script name (scripts starting with the @ symbol refer to embedded scripts)