function SetAlias { Param( [Parameter(Mandatory = $true, Position = 0)] [string]$Alias, [Parameter(Mandatory = $true, Position = 1)] [string[]]$Command ) foreach ($cmd in $Command) { # 空白を含んでいたら関数として定義 if ($Command -match "\s") { $func = "function global:$Alias { $Command }" Invoke-Expression $func …