PowerShell Logo Small

New-GPO



This is the built-in help made by Microsoft for the command 'New-GPO', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a new GPO.

SYNTAX


New-GPO [-Name] <String> [-Comment <String>] [-Domain <String>] [-Server <String>] [-Confirm] [-WhatIf] [<CommonParameters>]
New-GPO [-Name] <String> [-Comment <String>] [-Domain <String>] [-Server <String>] -StarterGpoName <String> [-Confirm] [-WhatIf] [<CommonParameters>]
New-GPO [-Name] <String> [-Comment <String>] [-Domain <String>] [-Server <String>] -StarterGpoGuid <Guid> [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-GPO cmdlet creates a new GPO with a specified name. By default, the newly created GPO is not linked to a site, domain, or organizational unit (OU).


You can use this cmdlet to create a GPO that is based on a starter GPO by specifying the GUID or the display name of the Starter GPO, or by piping a StarterGpo object into
the cmdlet.


The cmdlet returns a GPO object, which represents the newly created GPO, that you can pipe to other Group Policy cmdlets.



<

RELATED LINKS


Online Version: http://go.microsoft.com/fwlink/?linkid=287725

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

C:\PS>New-GPO -Name TestGPO -comment "This is a test GPO."

DisplayName : TestGPO
DomainName : contoso.com
Owner : CONTOSO\Domain Admins
Id : b8c1f2c2-fbd3-4a1f-94e1-3e156a65a29a
GpoStatus : AllSettingsEnabled
Description : This is a test GPO.
CreationTime : 3/2/2009 3:37:23 AM
ModificationTime : 3/2/2009 3:37:22 AM
UserVersion : AD Version: 0, SysVol Version: 0
ComputerVersion : AD Version: 0, SysVol Version: 0
WmiFilter :



Description

-----------

This command creates a GPO in the domain of the user. The GPO is created with the specified comment.




-------------------------- EXAMPLE 2 --------------------------

C:\PS>New-GPO -Name FromStarterGPO -StarterGPOName "Windows Vista EC Computer Starter GPO"



Description

-----------

This command creates a GPO in the domain of the user. The GPO is pre-populated with the settings of the Starter GPO.




-------------------------- EXAMPLE 3 --------------------------

C:\PS>new-gpo -name TestGPO | new-gplink -target "ou=marketing,dc=contoso,dc=com" | set-gppermissions -permissionlevel gpoedit -targetname "Marketing Admins" -targettype
group

DisplayName : TestGPO
DomainName : contoso.com
Owner : CONTOSO\Domain Admins
Id : b8c1f2c2-fbd3-4a1f-94e1-3e156a65a29a
GpoStatus : AllSettingsEnabled
Description :
CreationTime : 3/2/2009 3:37:23 AM
ModificationTime : 3/2/2009 3:37:22 AM
UserVersion : AD Version: 0, SysVol Version: 0
ComputerVersion : AD Version: 0, SysVol Version: 0
WmiFilter :



Description

-----------

This command creates a new GPO ("TestGPO"), links it to the "Marketing" OU in the contoso.com domain, and grants the "Marketing Admins" security group permissions to edit
the GPO.

A GPO object is returned by the command, so you could continue to configure the new GPO by piping the output to other cmdlets. For example, you could set Registry preference
items or registry-based policy settings by piping the output to Set-GPPrefRegistryValue or to Set-GPRegistryValue.