Gpo.Import Method (GpoBackup, GPMigrationTable, Boolean)

 

Imports the policy settings from the specified Group Policy object (GPO) backup by using the specified migration table and a value that specifies whether to fail if a map entry does not exist.

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

Syntax

public Gpo Import(
    GpoBackup gpoBackup,
    GPMigrationTable migrationTable,
    bool failOnMissingMapEntry
)
public:
Gpo^ Import(
    GpoBackup^ gpoBackup,
    GPMigrationTable^ migrationTable,
    bool failOnMissingMapEntry
)
member Import : 
        gpoBackup:GpoBackup *
        migrationTable:GPMigrationTable *
        failOnMissingMapEntry:bool -> Gpo
Public Function Import (
    gpoBackup As GpoBackup,
    migrationTable As GPMigrationTable,
    failOnMissingMapEntry As Boolean
) As Gpo

Parameters

  • failOnMissingMapEntry
    Type: System.Boolean

    true to fail if a map entry does not exist for a security principal or a UNC path; otherwise, false.

Return Value

Type: Microsoft.GroupPolicy.Gpo

Returns Gpo. The GPO with the new settings imported.

Exceptions

Exception Condition
ArgumentNullException

gpoBackup or migrationTable is null.

Remarks

This method maps security principals and UNC paths using the information specified in the migration table, according to the value specified for failOnMissingMapEntry. Settings are mapped in the following manner:

  • If failOnMissingMapEntry is true and a setting cannot be mapped through the migration table, the method fails.

  • If failOnMissingMapEntry is false and a setting is found for which there is no map entry corresponding to a security principal or UNC path, the setting is imported without modification from the GPO backup. Security on the GPO and Software Installation Package objects is not copied.

See Also

Import Overload
Gpo Class
Microsoft.GroupPolicy Namespace

Return to top