How do I Start a job of a function i just defined?
function FOO { write-host "HEY" }
Start-Job -ScriptBlock { FOO } |
Receive-Job -Wait -AutoRemoveJob
Result:
Receive-Job: The term 'FOO' is not recognized as the name of cmdlet,
function ,script file or operable program.
What do I do? Thanks.