揮発性のメモ2

http://d.hatena.ne.jp/iww/

powershellでHello,world!

まずはpowershellスクリプトを作成
hello.ps1

Write-Output "Hello,world!"


ファイルを指定して実行

C:\> powershell -ExecutionPolicy Bypass -File hello.ps1
Hello,world!

C:\>

powershellコマンドを使うので、コマンドプロンプトからでも普通に実行できる


Write-Output (Microsoft.PowerShell.Utility) - PowerShell | Microsoft Learn
管理権限を持っていないユーザーで PowerShell スクリプトを実行する