Skip to content

Commit 610c2d1

Browse files
committed
Get-GPInheritance
1 parent a9fae1e commit 610c2d1

24 files changed

+402
-318
lines changed

docset/winserver2022-ps/grouppolicy/Get-GPInheritance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ can specify either the fully qualified domain name (FQDN) or the host name.
193193
If you do not specify the name by using the **Server** parameter, the primary domain controller
194194
(PDC) emulator is contacted.
195195
196-
You can also refer to the **Server** parameter by its built-in alias, dc.
196+
You can also refer to the **Server** parameter by its built-in alias, **DC**.
197197
198198
```yaml
199199
Type: System.String

docset/winserver2022-ps/grouppolicy/Get-GPO.md

Lines changed: 86 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -11,108 +11,106 @@ title: Get-GPO
1111
# Get-GPO
1212

1313
## SYNOPSIS
14+
1415
Gets one GPO or all the GPOs in a domain.
1516

1617
## SYNTAX
1718

1819
### ByGUID (Default)
20+
1921
```
2022
Get-GPO [-Guid] <Guid> [[-Domain] <String>] [[-Server] <String>] [-All] [<CommonParameters>]
2123
```
2224

2325
### ByName
26+
2427
```
2528
Get-GPO [-Name] <String> [[-Domain] <String>] [[-Server] <String>] [-All] [<CommonParameters>]
2629
```
2730

2831
### GetAll
32+
2933
```
3034
Get-GPO [[-Domain] <String>] [[-Server] <String>] [-All] [<CommonParameters>]
3135
```
3236

3337
## DESCRIPTION
34-
The **Get-GPO** cmdlet gets one Group Policy Object (GPO) or all the GPOs in a domain.
35-
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 through the *All* parameter.
38+
39+
The **Get-GPO** cmdlet gets one Group Policy Object (GPO) or all the GPOs in a domain. You can
40+
specify a GPO by its display name or by its globally unique identifier (GUID) to get a single GPO,
41+
or you can get all the GPOs in the domain through the **All** parameter.
3642

3743
This cmdlet returns one or more objects that represent the requested GPOs.
3844
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.
3945

4046
## EXAMPLES
4147

4248
### Example 1: Get a single GPO from a domain
43-
```
44-
PS C:\> Get-GPO -Name "Group Policy Test"
45-
DisplayName : Group Policy Test
46-
47-
DomainName : contoso.com
48-
49-
Owner : CONTOSO\Domain Admins
50-
51-
Id : 31a09564-cd4a-4520-98fa-446a2af23b4b
5249

53-
GpoStatus : AllSettingsEnabled
50+
```powershell
51+
Get-GPO -Name "Group Policy Test"
52+
```
5453

54+
```Output
55+
DisplayName : Group Policy Test
56+
DomainName : contoso.com
57+
Owner : CONTOSO\Domain Admins
58+
Id : 31a09564-cd4a-4520-98fa-446a2af23b4b
59+
GpoStatus : AllSettingsEnabled
5560
Description :
56-
57-
CreationTime : 2/26/2009 12:15:42 AM
58-
59-
ModificationTime : 2/26/2009 12:15:42 AM
60-
61-
UserVersion : AD Version: 0, SysVol Version: 0
62-
63-
ComputerVersion : AD Version: 0, SysVol Version: 0
64-
61+
CreationTime : 2/26/2009 12:15:42 AM
62+
ModificationTime : 2/26/2009 12:15:42 AM
63+
UserVersion : AD Version: 0, SysVol Version: 0
64+
ComputerVersion : AD Version: 0, SysVol Version: 0
6565
WmiFilter :
6666
```
6767

68-
This command gets the GPO named Group Policy Test.
69-
The GPO must exist in the domain of the user that is running the session (or, for startup and shutdown scripts, the computer).
70-
The command gets the GPO information by contacting the primary domain controller (PDC).
68+
This command gets the GPO named `Group Policy Test`. The GPO must exist in the domain of the user that
69+
is running the session (or, for startup and shutdown scripts, the computer). The command gets the
70+
GPO information by contacting the primary domain controller (PDC).
7171

7272
### Example 2: Get a single GPO by GUID
73-
```
74-
PS C:\> Get-GPO -Guid 31a09564-cd4a-4520-98fa-446a2af23b4b -Domain "sales.contoso.com"
75-
DisplayName : Group Policy Test
76-
77-
DomainName : sales.contoso.com
7873

79-
Owner : SALES\Domain Admins
80-
81-
Id : 31a09564-cd4a-4520-98fa-446a2af23b4b
82-
83-
GpoStatus : AllSettingsEnabled
84-
85-
Description :
86-
87-
CreationTime : 2/26/2009 12:15:42 AM
88-
89-
ModificationTime : 2/26/2009 12:15:42 AM
90-
91-
UserVersion : AD Version: 0, SysVol Version: 0
92-
93-
ComputerVersion : AD Version: 0, SysVol Version: 0
74+
```powershell
75+
Get-GPO -Guid 31a09564-cd4a-4520-98fa-446a2af23b4b -Domain "sales.contoso.com"
76+
```
9477

78+
```Output
79+
DisplayName : Group Policy Test
80+
DomainName : sales.contoso.com
81+
Owner : SALES\Domain Admins
82+
Id : 31a09564-cd4a-4520-98fa-446a2af23b4b
83+
GpoStatus : AllSettingsEnabled
84+
Description :
85+
CreationTime : 2/26/2009 12:15:42 AM
86+
ModificationTime : 2/26/2009 12:15:42 AM
87+
UserVersion : AD Version: 0, SysVol Version: 0
88+
ComputerVersion : AD Version: 0, SysVol Version: 0
9589
WmiFilter :
9690
```
9791

98-
This command gets the GPO that has the ID (GUID) 331a09564-cd4a-4520-98fa-446a2af23b4b in the sales.contoso.com domain.
99-
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.
100-
The command retrieves the GPO information by contacting the PDC (in the sales.contoso.com domain).
92+
This command gets the GPO that has the ID (GUID) `331a09564-cd4a-4520-98fa-446a2af23b4b` in the
93+
`sales.contoso.com` domain. If the domain of the user that is running the session (or, for startup and
94+
shutdown scripts, the computer) is different that `sales.contoso.com`, a trust must exist between the
95+
two domains. The command retrieves the GPO information by contacting the PDC (in the
96+
`sales.contoso.com` domain).
10197

10298
### Example 3: Get all GPOs from a domain
103-
```
104-
PS C:\> Get-GPO -All -Domain "sales.contoso.com"
99+
100+
```powershell
101+
Get-GPO -All -Domain "sales.contoso.com"
105102
```
106103

107-
This command get all the GPOs in the sales.contoso.com domain.
104+
This command get all the GPOs in the `sales.contoso.com` domain.
108105

109106
## PARAMETERS
110107

111108
### -All
109+
112110
Indicates that the cmdlet gets all the GPOs in the domain.
113111

114112
```yaml
115-
Type: SwitchParameter
113+
Type: System.Management.Automation.SwitchParameter
116114
Parameter Sets: (All)
117115
Aliases:
118116

@@ -124,22 +122,23 @@ Accept wildcard characters: False
124122
```
125123
126124
### -Domain
127-
Specifies the domain for this cmdlet.
128-
You must specify the fully qualified domain name (FQDN) of the domain.
125+
126+
Specifies the domain for this cmdlet. You must specify the fully qualified domain name (FQDN) of the
127+
domain.
129128
130129
For the **Get-GPO** cmdlet, the GPO (or GPOs) to that this cmdlet gets must exist in this domain.
131130
132-
If you do not specify the *Domain* parameter, the domain of the user that is running the current session is used.
133-
If the cmdlet is being run from a computer startup or shutdown script, the domain of the computer is used.
134-
For more information, see the Notes section in the full Help.
131+
If you do not specify the **Domain** parameter, the domain of the user that is running the current
132+
session is used. If the cmdlet is being run from a computer startup or shutdown script, the domain
133+
of the computer is used. For more information, see the Notes section in the full Help.
135134
136135
If you specify a domain that is different from the domain of the user that is running the current session (or, for a startup or shutdown script, the computer), a trust must exist between that domain and the domain of the user or the computer.
137136
138-
You can also refer to the *Domain* parameter by its built-in alias, domainname.
139-
For more information, see about_Aliases.
137+
You can also refer to the **Domain** parameter by its built-in alias, **DomainName**.
138+
For more information, see [about_Aliases](????????????).
140139
141140
```yaml
142-
Type: String
141+
Type: System.String
143142
Parameter Sets: (All)
144143
Aliases: DomainName
145144

@@ -151,10 +150,11 @@ Accept wildcard characters: False
151150
```
152151
153152
### -Guid
154-
Specifies the GPO to retrieve by its globally unique identifier (GUID).
155-
The GUID uniquely identifies the GPO.
156153
157-
You can also refer to the *Guid* parameter by its built-in alias, id.
154+
Specifies the GPO to retrieve by its globally unique identifier (GUID). The GUID uniquely identifies
155+
the GPO.
156+
157+
You can also refer to the **Guid** parameter by its built-in alias, **Id**.
158158
159159
```yaml
160160
Type: Guid
@@ -169,16 +169,17 @@ Accept wildcard characters: False
169169
```
170170
171171
### -Name
172+
172173
Specifies the GPO to retrieve by its display name.
173174
174-
The display name is not guaranteed to be unique in the domain.
175-
If another GPO with the same display name exists in the domain an error occurs.
176-
You can use the Guid parameter to uniquely identify a GPO.
175+
The display name is not guaranteed to be unique in the domain. If another GPO with the same display
176+
name exists in the domain an error occurs. You can use the **Guid** parameter to uniquely identify a
177+
GPO.
177178
178-
You can also refer to the *Name* parameter by its built-in alias, displayname.
179+
You can also refer to the **Name** parameter by its built-in alias, **DisplayName**.
179180
180181
```yaml
181-
Type: String
182+
Type: System.String
182183
Parameter Sets: ByName
183184
Aliases: DisplayName
184185

@@ -190,15 +191,17 @@ Accept wildcard characters: False
190191
```
191192
192193
### -Server
193-
Specifies the name of the domain controller that this cmdlet contacts to complete the operation.
194-
You can specify either the fully qualified domain name (FQDN) or the host name.
195194
196-
If you do not specify the name by using the Server parameter, the primary domain controller (PDC) emulator is contacted.
195+
Specifies the name of the domain controller that this cmdlet contacts to complete the operation. You
196+
can specify either the fully qualified domain name (FQDN) or the host name.
197197
198-
You can also refer to the Server parameter by its built-in alias, dc.
198+
If you do not specify the name by using the **Server** parameter, the primary domain controller
199+
(PDC) emulator is contacted.
200+
201+
You can also refer to the **Server** parameter by its built-in alias, **DC**.
199202
200203
```yaml
201-
Type: String
204+
Type: System.String
202205
Parameter Sets: (All)
203206
Aliases: DC
204207

@@ -210,21 +213,28 @@ Accept wildcard characters: False
210213
```
211214
212215
### CommonParameters
213-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
216+
217+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
218+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
219+
-WarningAction, and -WarningVariable. For more information, see
220+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
214221
215222
## INPUTS
216223
217224
### Microsoft.GroupPolicy.Gpo
218-
You can pipe a GPO for which to get information to this cmdlet.
219-
You can pipe GPO objects into this cmdlet to display information about the GPOs.
220-
Collections that contain GPOs from different domains are not supported.
225+
226+
You can pipe a GPO for which to get information to this cmdlet. You can pipe GPO objects into this
227+
cmdlet to display information about the GPOs. Collections that contain GPOs from different domains
228+
are not supported.
221229
222230
## OUTPUTS
223231
224232
### Microsoft.GroupPolicy.Gpo
233+
225234
This cmdlet returns an object that represents the requested GPO.
226235
227236
## NOTES
237+
228238
* You can use the *Domain* parameter to explicitly specify the domain for this cmdlet.
229239
230240
If you do not explicitly specify the domain, the cmdlet uses a default domain.

docset/winserver2022-ps/grouppolicy/Get-GPOReport.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Because no *Path* parameter is supplied, the report is written to the display.
7474
Indicates that the cmdlet generates a report for all GPOs in the domain.
7575

7676
```yaml
77-
Type: SwitchParameter
77+
Type: System.Management.Automation.SwitchParameter
7878
Parameter Sets: ReportAll
7979
Aliases:
8080

@@ -101,11 +101,11 @@ For more information, see the Notes section in the full Help.
101101
102102
If you specify a domain that is different from the domain of the user that is running the current session or, (for a startup or shutdown script, the computer), a trust must exist between that domain and the domain of the user or the computer.
103103
104-
You can also refer to Domain by its built-in alias, domainname.
105-
For more information, see about_Aliases.
104+
You can also refer to Domain by its built-in alias, **DomainName**.
105+
For more information, see [about_Aliases](????????????).
106106
107107
```yaml
108-
Type: String
108+
Type: System.String
109109
Parameter Sets: (All)
110110
Aliases: DomainName
111111

@@ -120,7 +120,7 @@ Accept wildcard characters: False
120120
Specifies the GPO for which to generate the report by its globally unique identifier (GUID).
121121
The GUID uniquely identifies the GPO.
122122
123-
You can also refer to the *Guid* parameter by its built-in alias, id.
123+
You can also refer to the *Guid* parameter by its built-in alias, **Id**.
124124
For more information, see **about_Aliases**.
125125
126126
```yaml
@@ -142,11 +142,11 @@ The display name is not guaranteed to be unique in the domain.
142142
If another GPO with the same display name exists in the domain an error occurs.
143143
You can use the *Guid* parameter to uniquely identify a GPO.
144144
145-
You can also refer to the *Name* parameter by its built-in alias, displayname.
145+
You can also refer to the **Name** parameter by its built-in alias, **DisplayName**.
146146
For more information, see **about_Aliases**.
147147
148148
```yaml
149-
Type: String
149+
Type: System.String
150150
Parameter Sets: ByName
151151
Aliases: DisplayName
152152

@@ -162,7 +162,7 @@ Specifies the path to the report file; for instance, c:\Reports\GpoReport.xml.
162162
If no path is specified, the report is printed to the display.
163163
164164
```yaml
165-
Type: String
165+
Type: System.String
166166
Parameter Sets: (All)
167167
Aliases:
168168

@@ -199,11 +199,11 @@ You can specify either the fully qualified domain name (FQDN) or the host name.
199199
200200
If you do not specify the name by using the *Server* parameter, the primary domain controller (PDC) emulator is contacted.
201201
202-
You can refer to this parameter by its built-in alias, dc.
202+
You can refer to this parameter by its built-in alias, **DC**.
203203
For more information, see **about_Aliases**.
204204
205205
```yaml
206-
Type: String
206+
Type: System.String
207207
Parameter Sets: (All)
208208
Aliases: DC
209209

@@ -215,6 +215,7 @@ Accept wildcard characters: False
215215
```
216216
217217
### CommonParameters
218+
218219
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
219220
220221
## INPUTS
@@ -229,6 +230,7 @@ Collections that contain GPOs from different domains are not supported.
229230
This cmdlet does not generate any output.
230231
231232
## NOTES
233+
232234
* You can use the *Domain* parameter to explicitly specify the domain for this cmdlet.
233235
234236
If you do not explicitly specify the domain, the cmdlet uses a default domain.

0 commit comments

Comments
 (0)