How to install GroupPolicy module for PowerShell?

Uno1404 picture Uno1404 · Jan 15, 2019 · Viewed 13.2k times · Source

I just started writing scripts in PowerShell.
The desired script is supposed to create a local GroupPolicyObject (GPO) which will be specified afterwards. Research showed that it could be done with the New-GPO command within the GroupPolicy module for PowerShell. I tried to install the mentioned module but unfortunately nothing I found worked. May I ask for help?

I am using Windows 7 and Powershell 5.1.14409.1005

Error I receive when running example from Microsoft page (New-GPO -Name TestGPO -Comment "This is a test GPO."): Error when running (New-GPO -Name TestGPO -Comment "This is a test GPO.") - example provided by Microsoft

Answer

Leon Evans picture Leon Evans · Jan 15, 2019

Have you installed the RSAT (Remote Server Administration Tools) Group Policy component?