You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Import-Module FSWatcherEngineEvent
as part of the job fails with this message:
The current Windows PowerShell host is: 'ServerRemoteHost' (version 1.0.0.0). The module 'C:\Users\...\Documents\WindowsPowerShell\Modules\FSWatcherEngineEvent\1.5.0\FSWatcherEngineEvent.psd1' requires a minimum Windows PowerShell host version of '5.1' to run.
+ CategoryInfo : ResourceUnavailable: (C:\Users\rtheob...ngineEvent.psd1:String) [Import-Module], InvalidOperationException
+ FullyQualifiedErrorId : Modules_InsufficientPowerShellHostVersion,Microsoft.PowerShell.Commands.ImportModuleCommand
+ PSComputerName : localhost
If I import the module outside the job, I get a different error:
The 'New-FileSystemWatcher' command was found in the module 'FSWatcherEngineEvent', but the module could not be loaded. For more information, run 'Import-Module FSWatcherEngineEvent'.
+ CategoryInfo : ObjectNotFound: (New-FileSystemWatcher:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
+ PSComputerName : localhost
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.
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/
The text was updated successfully, but these errors were encountered: