私は次のPSスクリプトを持っています:
function Install-BizTalkApplication
{
param(
[Parameter(Position=0,Mandatory=$true,HelpMessage="Msi file should be existing")]
[ValidateScript({Test-Path $_})]
[Alias("msi")]
[string]$MsiFile,
[Parameter(Position=1,HelpMessage="Path wherein the resource file will be installed")]
[Alias("path")]
[string]$ApplicationInstallPath,
[Parameter(Position=2,Mandatory=$true,HelpMessage="Only valid parameters are Local,Dev,Test and Prod")]
[Alias("env")]
[ValidateSet("Local","Dev","Prod","Test")]
[string]$Environment,
[bool]$BTDeployMgmtDB=$true,
[bool]$SkipUndeploy=$true
)
Powershell ISEを使用して、次のように3つのパラメーターを渡してスクリプトを実行しようとします。
BTDF\Sources\Deployment\BuildAndDeploy.ps1 -msi "C:\Builds\1\CIDemo2\CIDemo2 BTDF\Sources\Deployment\bin\Debug\CIDemo-1.0.0.msi" -ApplicationInstallPath "c:\program files (x86)\CIDemo" -Environment "Dev"
しかし、次のエラーが発生します。
The string starting:
At line:1 char:1
+ <<<< 'C:\Builds\1\CIDemo2\CIDemo2 BTDF\Sources\Deployment\BuildAndDeploy.ps1 -msi "C:\Builds\1\CIDemo2\CIDemo2 BTDF\Sources\Deployment\bin\Debug\CIDemo-1.0.0.msi" -ApplicationInstallPath "c:\program files
(x86)\CIDemo" -Environment "Dev"
is missing the terminator: '.
At line:1 char:233
スペースを含むパラメータを渡す方法を誰かに説明してもらえますか?一重引用符を使用してみましたが、喜びはありません。