We are trying to write a background job in PowerShell
using Start-Job
. This job consumes a cmdlet. For some reasons, the cmdlet is not recognized. However the same cmdlet works when accessed directly.
Code Snippet : Start-Job -ScriptBlock { }
Error :
The term 'commandletName' 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. + CategoryInfo : ObjectNotFound: (commandletName:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException + PSComputerName : localhost
Do i need to import something separately specific for background jobs?