Partager via


Get-GPResultantSetOfPolicy

Get-GPResultantSetOfPolicy

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

Syntax

Get-GPResultantSetofPolicy -Path <string> -ReportType {<Xml> | <Html>} [-Computer <string>] [-User <string>] [<CommonParameters>]

Detailed Description

The Get-GPResultantSetofPolicy cmdlet outputs the Resultant Set of Policy (RSoP) information for a user, a computer, or both to a file.

Parameters

-Computer <string>

Specifies the name of the computer for which to generate the report. You can specify the computer name in one of the following formats:
-- Full computer name (FQDN computer name); for example, computer-01.sales.contoso.com.
-- Fully-qualified domain name (FQDN)\computer name; for example, sales.contoso.com\computer-01.
-- NetBIOS domain name\computer name; for example, sales\computer-01.
-- Computer name (host name): for example, computer-01.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Path <string>

Specifies the path to the report file; for example, c:\Reports\GpRsopReport.xml.

You can also refer to the Path parameter by its built-in alias, "filepath". For more information, see about_Aliases.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-ReportType <ReportType>

Specifies the format of the RSoP report. You must specify either Html (for HTML format) or Xml (for XML format). These values are not case sensitive.

The following values are permitted for this object type.

  • Xml **

  • Html **

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-User <string>

Specifies the user name of the user for which to generate the report. You can specify the user name in one of the following formats:
-- Fully-qualified domain name (FQDN)\user name; for example, sales.contoso.com\someuser.
-- NetBIOS domain name\user name; for example, sales\someuser.
-- User name: for example, someuser.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-CommonParameter

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see About Common Parameter

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Input Type

None. This cmdlet does not take any object as input.

Return Type

Microsoft.GroupPolicy.GPRsop. Get-GPResultantSetOfPolicy returns an RSoP object.

Notes

  • The Get-GPResultantSetofPolicy cmdlet provides only the logging results for a specified computer and user. You must use the GPMC to generate RSoP modeling information.

Examples

EXAMPLE 1

C:\PS>

get-gpresultantsetofpolicy -reporttype xml -path c:\reports\LocalUserAndComputerReport.xml



RsopMode        : Logging

Namespace       : \\COMPUTER-02-PC\Root\Rsop\NS2BBE3F29_794F_4EAE_B9DB_0A2310622534

LoggingComputer : COMPUTER-02-PC

LoggingUser     : CONTOSO\someuser

LoggingMode     : UserAndComputer                        

Description

-----------

This command generates a report for the user (CONTOSO\someuser) that is running the session and the computer (COMPUTER-02-PC) on which the session is running. The report is generated in XML format, and is written to the specified file.

EXAMPLE 2

C:\PS>

Get-GPResultantSetOfPolicy -reporttype xml -computer computer-08-pc.contso.com -path c:\reports\computer-08-pc.xml



RsopMode        : Logging

Namespace       : \\computer-08-pc.contoso.com\Root\Rsop\NS643B2E66_8F54_4407_A813_7D47173B0922

LoggingComputer : computer-pc-08.contoso.com

LoggingUser     : CONTOSO\Administrator

LoggingMode     : Computer                        

Description

-----------

This command generates a report for the specified computer. The computer is specified by its fully-qualified domain name (FQDN), computer-08-pc.contso.com. The report is generated in XML format, and is written to the specified file.

EXAMPLE 3

C:\PS>

Get-GPResultantSetofPolicy -user contoso\someuser -reporttype html -path c:\reports\UserReport.html



RsopMode        : Logging

Namespace       : \\COMPUTER-02-PC\Root\Rsop\NS78355E76_C754_41B5_8F5E_B61551837A62

LoggingComputer : COMPUTER-02-PC

LoggingUser     : contoso\someuser

LoggingMode     : User                        

Description

-----------

This command generates a report for the specified user (contoso\someuser) in HTML format and saves it to the specified file.

EXAMPLE 4

C:\PS>

Get-GPResultantSetOfPolicy -user someuser -computer contoso.com\computer-01-pc -reporttype html -path c:\reports\UserAndComputerReport.html



RsopMode        : Logging

Namespace       : \\computer-08-pc\Root\Rsop\NS72116C25_6570_4586_9B79_FC4F71372E57

LoggingComputer : contoso.com\computer-08-pc

LoggingUser     : someuser

LoggingMode     : UserAndComputer                        

Description

-----------

This command generates a report for the specified computer (contoso.com\computer-08-pc) and user (someuser) in HTML format and saves it to the specified file.