Get-GPResultantSetOfPolicy

Get-GPResultantSetOfPolicy

Gets and writes the RSoP information for a user, a computer, or both to a file.

Syntax

Parameter Set: Default
Get-GPResultantSetOfPolicy -Path <String> -ReportType <ReportType> {Xml | Html} [-Computer <String> ] [-User <String> ] [ <CommonParameters>]




Detailed Description

The Get-GPResultantSetofPolicy cmdlet gets and writes 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 instance, sales.contoso.com\computer-01.

-- NetBIOS domain name\computer name; for instance, sales\computer-01.

-- Computer name (host name): for instance, computer-01.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

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

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-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 acceptable values for this parameter are: Html or Xml.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-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 instance, sales.contoso.com\someuser.

-- NetBIOS domain name\user name; for example, sales\someuser.

-- User name: for example, someuser.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

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

  • None

    This cmdlet does not take any object as input.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.GroupPolicy.GPRsop

    This cmdlet returns an RSoP object.


Notes

  • This 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: Generate a report for the default user that is running on the current session

This command generates a report for the default user that is running on the current session. The report is generated in XML format, and is written to the specified file.


PS C:\> Get-GPResultantSetOfPolicy -ReportType Xml -Path "c:\reports\LocalUserAndComputerReport.xml"

Example 2: Generate a report for the specified computer

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


PS C:\> Get-GPResultantSetOfPolicy -ReportType Xml -Computer "computer-08.contso.com" -Path "c:\reports\computer-08.xml"

Example 3: Generate a report for the specified user in HTML format and save it to the specified file

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


PS C:\> Get-GPResultantSetofPolicy -User "Contoso\PattiFul" -ReportType Html -Path "c:\reports\UserReport.html" 

Example 4: Generate a report for the specified computer and user in HTML format and save it to the specified file

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


PS C:\> Get-GPResultantSetOfPolicy -user someuser -computer contoso.com\computer-08 -reporttype html -path c:\reports\UserAndComputerReport.html 

Community Additions

ADD
Show: