Open the created task scheduler
switch to the “Action” tab and select your created “Action”
In the Edit section, using the browser you could select powershell.exe in your system32\WindowsPowerShell\v1.0 folder.
Example -C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Next, in the ‘Add arguments’ -File parameter, paste your script file path in your system.
Example – c:\GetMFAStatus.ps1
This blog might help you to automate your Powershell scripts with windows task scheduler