I am executing a command of the form rake drive:unit_tests:load_data parameters here'. I get the error
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.`
I used the code in my ps1
file :
$dat1 = one ruby command | Out-String
# $dat1 will contain the value - rake drive:unit_tests:load_data
$dat2 = " parameters here"
$dat3 = $dat1 + $dat2
& $dat3
Source: Executing a Command stored in a Variable from Powershell