Failed to load Module "Microsoft.PowerShell.Core"

I'm trying to run a constructor script from Task Scheduler in Windows Server 2012 R2, and after starting my job, I get the following message in the event log: The module 'Microsoft.PowerShell.Core' could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Core'

Of course it doesn't make sense since PowerShell can't be PowerShell without the core library (and therefore why can't I can find help on Google.)

Additional information that may be relevant: The script runs on a computer called VW3

and reads a script from a shared folder on \\VW1\Developers\Continuous Integration

. The user, Build Worker, set to run the build task has all permissions on the CI folder. If I run the script as a Build Worker user manually in Powershell, it ran without issue, it only fails when I run it from Task Scheduler. My folder is Start In:

set to\\VW1\Developers\Continuous Integration\

+3


source to share





All Articles