Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

cannot run the following modules are missing

$
0
0

Hey guys,

I’ve got a server that seems to have gone… loopy. I can’t suggest anything that has changed about its configuration as I can’t quite remember the last time I used the scripts on the server.

So… the issue

The script 'Export-GPOsOnOrganizationalUnit.ps1' cannot be run because the following modules that are specified by the "#requires" statements of the script are missing: GroupPolicy.

This script requires the ‘GroupPolicy’ module, installed with RSATs that are installed. If I load the GroupPolicy module first, then run the script, it works fine.

If I run the script on my laptop or a few other PS5 clients (not Server 2008 R2 PS5), then it automagically loads the GroupPolicy module and runs the script correctly.

Is there anything I can look at to see what changed this behaviour and/or how I can go about reverting it? I’d rather not have to keep loading modules before using scripts etc.

submitted by /u/sparkblaze
[link] [comments]

The post cannot run the following modules are missing appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793