我在远程计算机上使用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
答案 0 :(得分:6)
工作流程是Powershell v3的一项新功能,在v2中不可用