Importing PowerShell Group Policy modules

Since I am using a fresh Windows 10 workstation with the RSAT tools installed, my Group Policy PowerShell cmdlets are all going to work without any special considerations. If you attempt to run the commands in this chapter and are receiving errors that your PowerShell doesn't seem to know what to do with those commands, then it sounds like you are running a version of PowerShell old enough that you need to manually import the Group Policy module before you can expect any results.

The command for importing that module is Import-Module GroupPolicy.

If you are unsure about whether or not you already have the Group Policy-specific PowerShell cmdlets available to use, there is a helpful command you can ...

Get Mastering Windows Group Policy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.