Windows/powershell/関数
ナビゲーションに移動
検索に移動
関数
function Add ($a, $b)
{
Write-Host ($a + $b)
}
Add 5 4
別ファイルの関数を呼び出す
fun.ps1
function Add ($a, $b)
{
Write-Host ($a + $b)
}
funcall.ps1
. ./fun.ps1 # . "./fun.ps1" # もしくはこちら Add 5 4