Group Policy module is not found in my PowerShell

Deok Jong Moon 125 Reputation points
2023-03-06T06:15:37.2733333+00:00

Hi there,

Basically, I was trying to create or use Group Policy Object in my PowerShell script for the first time, and found out I coudn't locate any of the gpo related commands there.

For example, when I typed

Get-Command -module GroupPolicy

or

Get-Command -Name GPO* (or 

there is nothing that comes up on the screen.

How could I install them or use them?

Thanks in advance!

Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

Accepted answer
  1. Rich Matheisen 47,901 Reputation points
    2023-03-06T15:58:00.8433333+00:00

    I don't believe that the GroupPolicy module (like many others) is useable directly in PowerShell 7.

    You can try installing the module, but you'll have to use the "Import-Module" command, with the -UseWindowsPowerShell switch to get it to work. Even then, I'm not sure if the necessary connection protocols work in your O/S.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.