I'm using Powershell v2.0 on a remote machine and I created a workflow there using the following code:
workflow install {
Param(
[Parameter(Mandatory=$True, Position=1)]
[string]$currentLocation
)
...
}
I've tested on my local machine, where I have Powershell v3.0 and it's working, but on the remote machine I'm getting this error:
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