You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docset/winserver2022-ps/grouppolicy/Get-GPO.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,7 +235,7 @@ This cmdlet returns an object that represents the requested GPO.
235
235
236
236
## NOTES
237
237
238
-
* You can use the *Domain* parameter to explicitly specify the domain for this cmdlet.
238
+
* You can use the **Domain** parameter to explicitly specify the domain for this cmdlet.
239
239
240
240
If you do not explicitly specify the domain, the cmdlet uses a default domain.
241
241
The default domain is the domain that is used to access network resources by the security context under which the current session is running.
@@ -247,7 +247,7 @@ Therefore, when this cmdlet is run from a startup or shutdown script, the defaul
247
247
248
248
Only one domain can be used by an instance of this cmdlet.
249
249
If you pipe a collection of GPO (Microsoft.GroupPolicy.Gpo) objects to this cmdlet, the DomainName property of the first GPO object in the collection specifies the domain for the cmdlet.
250
-
This is because domainname is a built-in alias for the *Domain* parameter, and the *Domain* parameter can take its value by property name from the pipeline.
250
+
This is because domainname is a built-in alias for the **Domain** parameter, and the **Domain** parameter can take its value by property name from the pipeline.
251
251
A non-terminating error occurs for any GPOs in the collection that are not in this domain.
252
252
If this domain is different from the domain of the user account (for startup or shutdown scripts, the computer account), a trust must exist between the two domains.
The **Get-GPOReport** cmdlet generates a report in either XML or HTML format that describes properties and policy settings for a specified Group Policy Object (GPO) or for all GPOs in a domain.
38
-
The information that is reported for each GPO includes: details, links, security filtering, Windows Management Instrumentation (WMI) filtering, delegation, and computer and user configurations.
39
41
40
-
You can specify the *All* parameter to generate a report for every GPO in the domain, or you can specify either the *Name* or *Guid* parameter to generate a report for a single GPO.
41
-
You can also pipe GPO objects into this cmdlet.
42
-
If you specify a file through the *Path* parameter, the report is written to a file; otherwise, it is printed to the display.
42
+
The **Get-GPOReport** cmdlet generates a report in either XML or HTML format that describes
43
+
properties and policy settings for a specified Group Policy Object (GPO) or for all GPOs in a
44
+
domain. The information that is reported for each GPO includes: details, links, security filtering,
45
+
Windows Management Instrumentation (WMI) filtering, delegation, and computer and user
46
+
configurations.
47
+
48
+
You can specify the **All** parameter to generate a report for every GPO in the domain, or you can
49
+
specify either the **Name** or **Guid** parameter to generate a report for a single GPO. You can
50
+
also pipe GPO objects into this cmdlet. If you specify a file through the **Path** parameter, the
51
+
report is written to a file; otherwise, it is printed to the display.
43
52
44
53
## EXAMPLES
45
54
46
55
### Example 1: Generate an HTML report for the specified GPO
47
-
```
48
-
PS C:\> Get-GPOReport -Name "TestGPO1" -ReportType HTML -Path "C:\GPOReports\GPOReport1.html"
56
+
57
+
```powershell
58
+
Get-GPOReport -Name "TestGPO1" -ReportType HTML -Path "C:\GPOReports\GPOReport1.html"
49
59
```
50
60
51
-
This command generates a report in HTML format for the GPO TestGPO1 and writes it to the file C:\GPOReports\GPOReport1.html
61
+
This command generates a report in HTML format for the GPO `TestGPO1` and writes it to the file `C:\GPOReports\GPOReport1.html`
52
62
53
63
### Example 2: Generate an XML report for each GPO in the specified domain
Get-GPOReport -All -Domain "sales.contoso.com" -Server "DC1" -ReportType XML -Path "C:\GPOReports\GPOReportsAll.xml"
56
67
```
57
68
58
-
This command generates a report in XML format for each GPO in the sales.contoso.com domain and writes it to the file C:\GPOReports\GPOReportsAll.xml.
59
-
The DC1.sales.contoso.com domain controller is contacted to complete the operation.
69
+
This command generates a report in XML format for each GPO in the `sales.contoso.com` domain and
70
+
writes it to the file `C:\GPOReports\GPOReportsAll.xml`. The `DC1` domain controller is contacted to
71
+
complete the operation.
60
72
61
-
If the domain of the user account (or, for startup and shutdown scripts, the computer account) is different from sales.contoso2.com, a trust must exist between the two domains.
73
+
If the domain of the user account (or, for startup and shutdown scripts, the computer account) is
74
+
different from `sales.contoso2.com`, a trust must exist between the two domains.
62
75
63
76
### Example 3: Generate an XML report for a GPO with the specified GUID
64
-
```
65
-
PS C:\> Get-GPOReport -GUID 73624cc9-e8f2-4f05-8802-193fae8773ce -ReportType XML
77
+
78
+
```powershell
79
+
Get-GPOReport -GUID 73624cc9-e8f2-4f05-8802-193fae8773ce -ReportType XML
66
80
```
67
81
68
-
This command generates a report in XML format for the GPO with the specified GUID.
69
-
Because no *Path* parameter is supplied, the report is written to the display.
82
+
This command generates a report in XML format for the GPO with the specified `GUID`.
83
+
Because no **Path** parameter is supplied, the report is written to the display.
70
84
71
85
## PARAMETERS
72
86
73
87
### -All
88
+
74
89
Indicates that the cmdlet generates a report for all GPOs in the domain.
You must specify the fully qualified domain name (FQDN) of the domain.
104
+
105
+
Specifies the domain for this cmdlet. You must specify the fully qualified domain name (FQDN) of the
106
+
domain.
91
107
92
108
For the **Get-GPOReport** cmdlet:
93
109
94
110
- If a single GPO is specified, it must exist in this domain.
95
111
96
-
- If the *All* parameter is specified, a report is generated for each GPO in this domain.
112
+
- If the **All** parameter is specified, a report is generated for each GPO in this domain.
97
113
98
-
If you do not specify the *Domain* parameter, the domain of the user that is running the current session is used.
99
-
If the cmdlet is being run from a computer startup or shutdown script, the domain of the computer is used.
100
-
For more information, see the Notes section in the full Help.
114
+
If you do not specify the **Domain** parameter, the domain of the user that is running the current
115
+
session is used. If the cmdlet is being run from a computer startup or shutdown script, the domain
116
+
of the computer is used. For more information, see the Notes section in the full Help.
101
117
102
-
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.
118
+
If you specify a domain that is different from the domain of the user that is running the current
119
+
session or, (for a startup or shutdown script, the computer), a trust must exist between that domain
120
+
and the domain of the user or the computer.
103
121
104
-
You can also refer to Domain by its built-in alias, **DomainName**.
105
-
For more information, see [about_Aliases](????????????).
122
+
You can also refer to Domain by its built-in alias, **DomainName**. For more information, see
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).
243
+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
Collections that contain GPOs from different domains are not supported.
226
254
227
255
## OUTPUTS
228
256
229
257
### None
258
+
230
259
This cmdlet does not generate any output.
231
260
232
261
## NOTES
233
262
234
-
* You can use the *Domain* parameter to explicitly specify the domain for this cmdlet.
235
-
236
-
If you do not explicitly specify the domain, the cmdlet uses a default domain.
237
-
The default domain is the domain that is used to access network resources by the security context under which the current session is running.
238
-
This domain is typically the domain of the user that is running the session.
239
-
For instance, the domain of the user who started the session by opening Windows PowerShell from the Program Files menu, or the domain of a user that is specified in a runas command.
240
-
However, computer startup and shutdown scripts run under the context of the LocalSystem account.
241
-
The LocalSystem account is a built-in local account, and it accesses network resources under the context of the computer account.
242
-
Therefore, when this cmdlet is run from a startup or shutdown script, the default domain is the domain to which the computer is joined.
243
-
244
-
Only one domain can be used by an instance of this cmdlet.
245
-
If you pipe a collection of GPO (Microsoft.GroupPolicy.Gpo) objects to this cmdlet, the **DomainName** property of the first GPO object in the collection specifies the domain for the cmdlet.
246
-
This is because domainname is a built-in alias for the *Domain* parameter, and the *Domain* parameter can take its value by property name from the pipeline.
247
-
A non-terminating error occurs for any GPOs in the collection that are not in this domain.
248
-
If this domain is different from the domain of the user account, for startup or shutdown scripts, the computer account, a trust must exist between the two domains.
263
+
* You can use the **Domain** parameter to explicitly specify the domain for this cmdlet.
264
+
265
+
If you do not explicitly specify the domain, the cmdlet uses a default domain. The default domain
266
+
is the domain that is used to access network resources by the security context under which the
267
+
current session is running. This domain is typically the domain of the user that is running the
268
+
session. For instance, the domain of the user who started the session by opening Windows
269
+
PowerShell from the Program Files menu, or the domain of a user that is specified in a runas
270
+
command. However, computer startup and shutdown scripts run under the context of the LocalSystem
271
+
account. The LocalSystem account is a built-in local account, and it accesses network resources
272
+
under the context of the computer account. Therefore, when this cmdlet is run from a startup or
273
+
shutdown script, the default domain is the domain to which the computer is joined.
274
+
275
+
Only one domain can be used by an instance of this cmdlet. If you pipe a collection of GPO
276
+
(Microsoft.GroupPolicy.Gpo) objects to this cmdlet, the **DomainName** property of the first GPO
277
+
object in the collection specifies the domain for the cmdlet. This is because domainname is a
278
+
built-in alias for the **Domain** parameter, and the **Domain** parameter can take its value by
279
+
property name from the pipeline. A non-terminating error occurs for any GPOs in the collection
280
+
that are not in this domain. If this domain is different from the domain of the user account, for
281
+
startup or shutdown scripts, the computer account, a trust must exist between the two domains.
0 commit comments