如何在一个PS脚本中启动多个其他的PS脚本? 1


Start-Process powershell -ArgumentList D:\Peter_Liu\Power Shell\DeployInstallScript\Step01_Unzip the zip file to the specified location.ps1
Start-Process powershell -ArgumentList D:\Peter_Liu\Power Shell\DeployInstallScript\Step02_Read the configuration file of the DB installation document and modify it.ps1
Start-Process powershell -ArgumentList D:\Peter_Liu\Power Shell\DeployInstallScript\Step03_Read the bat file of the installation document and modify it.ps1

报错如下:

PS C:\Windows\system32> Start-Process powershell -ArgumentList D:\Peter_Liu\Power Shell\DeployInstallScript\Step01_Unzip the zip file to the specified location.ps1
Start-Process powershell -ArgumentList D:\Peter_Liu\Power Shell\DeployInstallScript\Step02_Read the configuration file of the DB installation document and modify it.ps1
Start-Process powershell -ArgumentList D:\Peter_Liu\Power Shell\DeployInstallScript\Step03_Read the bat file of the installation document and modify it.ps1
Start-Process : 找不到接受实际参数“Shell\DeployInstallScript\Step01_Unzip”的位置形式参数。
所在位置 行:1 字符: 1
+ Start-Process powershell -ArgumentList D:\Peter_Liu\Power Shell\Deplo …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-Process],ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand

Start-Process : 找不到接受实际参数“Shell\DeployInstallScript\Step02_Read”的位置形式参数。
所在位置 行:2 字符: 1
+ Start-Process powershell -ArgumentList D:\Peter_Liu\Power Shell\Deplo …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-Process],ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand

Start-Process : 找不到接受实际参数“Shell\DeployInstallScript\Step03_Read”的位置形式参数。
所在位置 行:3 字符: 1
+ Start-Process powershell -ArgumentList D:\Peter_Liu\Power Shell\Deplo …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-Process],ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand

×用微信扫描并分享

发表评论

电子邮件地址不会被公开。 必填项已用*标注

一条评论 “如何在一个PS脚本中启动多个其他的PS脚本?