我在远程机器上使用 Powershell v2.0,并使用以下代码在那里创建了一个工作流:
workflow install {
Param(
[Parameter(Mandatory=$True, Position=1)]
[string]$currentLocation
)
...
}
我已经在我的本地机器上进行了测试,我有 Powershell v3.0 并且它正在工作,但是在远程机器上我收到了这个错误:
The term 'workflow' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Install\Longitude\Longitude Components\Install.ps1:6 char:9
+ workflow <<<< install {
+ CategoryInfo : ObjectNotFound: (workflow:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException