タスクスケジューラー一覧

https://win2012r2.com/2021/08/02/powershell-taskschd/
SYSTEMユーザーを指定
プログラム=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
引数の追加=-ExecutionPolicy Bypass S:\robocopyS-O.ps1  


タスクスケジューラーではps1に注意

https://atmarkit.itmedia.co.jp/ait/articles/1412/03/news125.html

https://qiita.com/tomoko523/items/df8e384d32a377381ef9

https://www.google.com/search?client=firefox-b-d&q=PowerShell%E3%81%AEps1%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AB%E6%B3%A8%E6%84%8F%E3%80%80%E3%82%BF%E3%82%B9%E3%82%AF%E3%82%B9%E3%82%B1%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%A9%E3%83%BC