StarterGpoBackup.GenerateReportToFile Method (String, ReportType)

 

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

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

Syntax

public void GenerateReportToFile(
    string filePath,
    ReportType reportType
)
public:
void GenerateReportToFile(
    String^ filePath,
    ReportType reportType
)
member GenerateReportToFile : 
        filePath:string *
        reportType:ReportType -> unit
Public Sub GenerateReportToFile (
    filePath As String,
    reportType As ReportType
)

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