Open randallt opened 2 months ago
Hi @randallt, sorry for the late response, I was AFK for some days.
About the loading outside of the job: The module was found but couldn't be loaded. Please try to load the module using Import-Module FSWatcherEngineEvent -Verbose
. This should give us more details why the module wasn't loading. If this doesn't work a job can't do it either.
About the version check in the remote host: I don't have an env currently to try this out. What you could try is to remove the version requirement in the module manifest FSWatcherEngineEvent.psd1'
: Comment the line PowershellHostVersion="5.1"
out by adding #
at the beginning or simply remove the line and try again. Maybe this helps with the remote host.
Sorry for not being clear. With regards to:
If I import the module outside the job, I get a different error
The import outside the job is successful, but trying to use it inside the job is where the error occurs.
To reiterate, I was not using a second/remote host here--just trying to use a PowerShell Job.
I'm trying to run this as part of a job (just locally for now, but eventually remotely), but the minimum version check is failing.
Importing the module like this:
as part of the job fails with this message:
If I import the module outside the job, I get a different error:
Is this because I only installed the module using scope "CurrentUser"? I'm on a CORP box and don't have admin privileges. I came across this thread on reddit, but I'm not sure if it is applicable. https://www.reddit.com/r/PowerShell/comments/s1fcvc/startjob_ps_version_inconsistency/