I\'d like to setup a cmdlet to start and stop mysql, and I\'m trying to do so with Start-Job. the I\'ve got the following in my Powershell profile:
$mysqlpat
you have to use the -argumentlist parameter see get-help start-job :
-argumentlist
start-job -ScriptBlock { & $args[0] } -ArgumentList @($mysqlpath )
note that in V3 you just have to use the prefix using: before your varname ex:
using:
Start-Job -ScriptBlock { & "$using:mysqlpath\mysqld.exe" }