StarterGpoBackup.GenerateReportToFile Method (String, ReportType, GPStatusMessageCollection)

 

Generates a report for the Starter Group Policy object (GPO) in the specified format, saves it to the specified file, and returns status.

Namespace:   Microsoft.GroupPolicy
Assembly:  Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)

Syntax

public void GenerateReportToFile(
    string filePath,
    ReportType reportType,
    out GPStatusMessageCollection statusMessages
)
public:
void GenerateReportToFile(
    String^ filePath,
    ReportType reportType,
    [OutAttribute] GPStatusMessageCollection^% statusMessages
)
member GenerateReportToFile : 
        filePath:string *
        reportType:ReportType *
        statusMessages:GPStatusMessageCollection byref -> unit
Public Sub GenerateReportToFile (
    filePath As String,
    reportType As ReportType,
    <OutAttribute> ByRef statusMessages As GPStatusMessageCollection
)

Parameters

  • filePath
    Type: System.String

    The path of the file to which to save the report.

Exceptions

Exception Condition
ArgumentException

filePath is an empty string (“”).

ArgumentNullException

filePath is null.

MethodInvocationException

Directory structure specified in filePath does not exist.

Remarks

If filePath exists, the file will be overwritten. If the file name specified in filePath does not exist, the file will be created.

See Also

GenerateReportToFile Overload
StarterGpoBackup Class
Microsoft.GroupPolicy Namespace

Return to top