PowerShell Logo Small

Get-GPO



This is the built-in help made by Microsoft for the command 'Get-GPO', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 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

Gets one GPO or all the GPOs in a domain.

SYNTAX


Get-GPO [-Guid] <Guid> [[-Domain] <String>] [[-Server] <String>] [-All [<SwitchParameter>]] [<CommonParameters>]
Get-GPO [[-Domain] <String>] [[-Server] <String>] [-All [<SwitchParameter>]] [<CommonParameters>]
Get-GPO [-Name] <String> [[-Domain] <String>] [[-Server] <String>] [-All [<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-GPO cmdlet gets one GPO or all the GPOs in a domain. You can specify a GPO by its display name or by its globally unique identifier
(GUID) to get a single GPO, or you can get all the GPOs in the domain by specifying the All parameter.


The Get-GPO cmdlet returns one or more objects that represent the requested GPOs. By default, properties of the requested GPOs are printed to
the display; however, you can also pipe the output of the Get-GPO cmdlet to other Group Policy cmdlets.



<

RELATED LINKS

New-GPO

REMARKS

<

Examples


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

C:\PS>Get-GPO -name "Group Policy Test"

DisplayName : Group Policy Test

DomainName : contoso.com

Owner : CONTOSO\Domain Admins

Id : 31a09564-cd4a-4520-98fa-446a2af23b4b

GpoStatus : AllSettingsEnabled

Description :

CreationTime : 2/26/2009 12:15:42 AM

ModificationTime : 2/26/2009 12:15:42 AM

UserVersion : AD Version: 0, SysVol Version: 0

ComputerVersion : AD Version: 0, SysVol Version: 0

WmiFilter :



Description

-----------

This command retrieves the "Group Policy Test" GPO. The GPO must exist in the domain of the user that is running the session (or, for startup
and shutdown scripts, the computer). The command retrieves the GPO information by contacting the primary domain controller (PDC).




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

C:\PS>Get-GPO -Guid 31a09564-cd4a-4520-98fa-446a2af23b4b -Domain sales.contoso.com

DisplayName : Group Policy Test

DomainName : sales.contoso.com

Owner : SALES\Domain Admins

Id : 31a09564-cd4a-4520-98fa-446a2af23b4b

GpoStatus : AllSettingsEnabled

Description :

CreationTime : 2/26/2009 12:15:42 AM

ModificationTime : 2/26/2009 12:15:42 AM

UserVersion : AD Version: 0, SysVol Version: 0

ComputerVersion : AD Version: 0, SysVol Version: 0

WmiFilter :



Description

-----------

This command retrieves the GPO that has the ID (GUID) 331a09564-cd4a-4520-98fa-446a2af23b4b in the sales.contoso.com domain. If the domain of
the user that is running the session (or, for startup and shutdown scripts, the computer) is different that sales.contoso.com, a trust must
exist between the two domains. The command retrieves the GPO information by contacting the PDC (in the sales.contoso.com domain).




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

C:\PS>Get-GPO -All -Domain sales.contoso.com



Description

-----------

This command retrieves all the GPOs in the sales.contoso.com domain.