无法识别Powershell工作流命令



我在远程机器上使用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:InstallLongitudeLongitude ComponentsInstall.ps1:6 char:9
+ workflow <<<<  install {
    + CategoryInfo          : ObjectNotFound: (workflow:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

工作流是Powershell v3的一个新特性,在v2中不提供

最新更新