Windows PowerShellで動くスクリプトがPowerShellでも動くとは限らない、なぜなのか?
https://atmarkit.itmedia.co.jp/ait/articles/2403/12/news001.html