Export (0) Print
Expand All

Group Policy Cmdlets in Windows PowerShell

Windows Server 2012 R2 and Windows 8.1

Updated: March 26, 2014

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Windows PowerShell® is a task-based command-line shell and scripting language designed especially for system administration. This reference topic for the information technology (IT) professional provides assistance in utilizing the Windows PowerShell cmdlets to script and automate tasks.

Group Policy Cmdlets (in verb order)

This topic contains the brief descriptions of the Windows PowerShell® cmdlets that are for use in administering Group Policy in Windows Server and Windows client with Remote Server Administration Tools (RSAT) installed. (RSAT includes the GPMC and the Group Policy cmdlets.)

Each cmdlet in the table is linked to additional information about that cmdlet.

ImportantImportant
The Group Policy cmdlets can only be run on a computer that has the Group Policy Management Console (GPMC) installed.

 

Name Description

Backup-GPO

Backs up one GPO or all the GPOs in a domain.

Copy-GPO

Copies a GPO.

Get-GPInheritance

Retrieves Group Policy inheritance information for a specified domain or OU.

Get-GPO

Gets one GPO or all the GPOs in a domain.

Get-GPOReport

Generates a report in either XML or HTML format for a specified GPO or for all GPOs in a domain.

Get-GPPermission

Gets the permission level for one or more security principals on a specified GPO.

Get-GPPrefRegistryValue

Retrieves one or more registry preference items under either Computer Configuration or User Configuration in a GPO.

Get-GPRegistryValue

Retrieves one or more registry-based policy settings under either Computer Configuration or User Configuration in a GPO.

Get-GPResultantSetOfPolicy

Outputs the Resultant Set of Policy (RSoP) information to a file, for a user, a computer, or both.

Get-GPStarterGPO

Gets one Starter GPO or all Starter GPOs in a domain.

Import-GPO

Imports the Group Policy settings from a backed-up GPO into a specified GPO.

Invoke-GPUpdate

Updates Group Policy on a local computer or remote computer.

New-GPLink

Links a GPO to a site, domain, or OU.

New-GPO

Creates a new GPO.

New-GPStarterGPO

Creates a new Starter GPO.

Remove-GPLink

Removes a GPO link from a site, domain, or OU.

Remove-GPO

Deletes a GPO.

Remove-GPPrefRegistryValue

Removes one or more registry preference items from either Computer Configuration or User Configuration in a GPO.

Remove-GPRegistryValue

Removes one or more registry-based policy settings from either Computer Configuration or User Configuration in a GPO.

Rename-GPO

Assigns a new display name to a GPO.

Restore-GPO

Restores one GPO or all GPOs in a domain from one or more GPO backup files.

Set-GPInheritance

Blocks or unblocks inheritance for a specified domain or OU.

Set-GPLink

Sets the properties of the specified GPO link.

Set-GPPermission

Grants a level of permissions to a security principal for one GPO or for all the GPOs in a domain.

Set-GPPrefRegistryValue

Configures a registry preference item under either Computer Configuration or User Configuration in a GPO.

Set-GPRegistryValue

Configures one or more registry-based policy settings under either Computer Configuration or User Configuration in a GPO.

TipTip
You can import the cmdlets manually by running the following commands from Windows PowerShell:

  1. Import-Module ServerManager

  2. Add-WindowsFeature GPMC

  3. Get-Command -Module GroupPolicy

See Also

Reference

Commands

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft