1
パワーシェルのコマンドラインから渡されたテキストファイルにパラメータを書き込むには?コマンドラインから渡されたテキストファイルにパラメータを書き込む方法
Param (
[Parameter(Mandatory=$True)]
[ValidateNotNull()]
[int]$Var1,
[Parameter(Mandatory=$True)]
[ValidateNotNull()]
[int]$Var2
)
$Var1> 'C:\output.txt'
$Var1 | Set-Content 'C:\output.txt'
CommandLine:Powershell.exe -executionpolicy remotesigned -File Parameters.ps1 -Var1 1 -Var2 2
私は、テキストファイル