-
Notifications
You must be signed in to change notification settings - Fork 86
Description
I'm running PoshRSJob v1.7.4.4 on Powershell v5.1.15063.1029 on Windows 10.
I'm navigating to a folder named "Coffee.Application" with the following files:
- Coffee.Application.ps1
- Coffee.Application.psm1
I then run the following:
Start-RSJob -ScriptBlock { Get-CoffeeDBConnectionString } `
-Name t1 `
-ModulesToImport .\Coffee.Application.psm1
Receive-RSJob -Name t1Receive-RSJob -Name t1, returns the following error:
The term 'Get-Foo' 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.
The function Get-Foo is in the module Coffee.Application. I expected the thread to be able to execute the Get-Foo function in the Coffee.Application module.
The module's script file is in the current workspace. I can load the module into the active session with the following:
import-module .\Coffee.Application.psm1Once loaded, I can access any exposed functions.
I have tried closing all session. Starting a fresh session and making the call to Start-RSJob the first call made.