-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
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
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/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels