Group Policy Module not loading in memory

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
scarlson
Posts: 1
Last visit: Sun Oct 17, 2021 8:16 pm

Group Policy Module not loading in memory

Post by scarlson »

I have built an exe using the V3 script engine and when it runs on windows 2008 servers the
group policy module will not load even though the server has Powershell V5.

Its odd as I can execute the cmdlets for group policy fine in the shell but when using the exe
it won't, please see the screenshots attached.
Attachments
errors for tool.png
errors for tool.png (48.6 KiB) Viewed 2267 times

jvierra
Posts: 14952
Last visit: Fri Oct 22, 2021 4:25 pm
Answers: 14
Has voted: 3 times
Been upvoted: 11 times

Re: Group Policy Module not loading in memory

Post by jvierra »

The first thing to consider is that WS2008 has been obsolete and unsupported for years. The GP CmdLets no longer match the WS2008 API level.

While V5 will run on any version of Windows the modules won't. The GP Module was built fro a later version of Windows Server and teh GP subsystem was changed many times before the GP modules.

I recommend upgrading your server to a supported version which would be any version later than 2012.

I can also recommend playing with the "host" you are using for the EXE as sometimes some GPO CmdLets might work with different "host" implementations.

Also, you note that you are claiming a V3 build and saying the server has V5. I would suspect that a V3 build might have issues if the server only has V5 installed. Remember that no matter how you build an EXE it is still dependent on the PowerShell host version.

User avatar
Alexander Riedel
Posts: 7787
Last visit: Thu Oct 21, 2021 11:50 am
Answers: 6
Been upvoted: 11 times

Re: Group Policy Module not loading in memory

Post by Alexander Riedel »

I am somewhat curious what made you choose a V3 engine if your machine runs V5. Would you please elaborate?
Alexander Riedel
SAPIEN Technologies, Inc.

Locked