小编joh*_*e2e的帖子

无法识别Powershell工作流程命令

我在远程计算机上使用Powershell v2.0,并使用以下代码在那里创建了一个工作流程:

workflow install {
Param(
[Parameter(Mandatory=$True, Position=1)]
[string]$currentLocation
)
... 
}
Run Code Online (Sandbox Code Playgroud)

我已经在我的本地机器上进行了测试,在那里我有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
Run Code Online (Sandbox Code Playgroud)

powershell workflow

0
推荐指数
1
解决办法
1440
查看次数

标签 统计

powershell ×1

workflow ×1