Gpo.Import Method (GpoBackup, GPMigrationTable, GPStatusMessageCollection)
Imports the policy settings from the specified Group Policy object (GPO) backup by using the specified migration table and returns status.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Syntax
public Gpo Import(
GpoBackup gpoBackup,
GPMigrationTable migrationTable,
out GPStatusMessageCollection statusMessages
)
public:
Gpo^ Import(
GpoBackup^ gpoBackup,
GPMigrationTable^ migrationTable,
[OutAttribute] GPStatusMessageCollection^% statusMessages
)
member Import :
gpoBackup:GpoBackup *
migrationTable:GPMigrationTable *
statusMessages:GPStatusMessageCollection byref -> Gpo
Public Function Import (
gpoBackup As GpoBackup,
migrationTable As GPMigrationTable,
<OutAttribute> ByRef statusMessages As GPStatusMessageCollection
) As Gpo
Parameters
gpoBackup
Type: Microsoft.GroupPolicy.GpoBackupA GpoBackup object that represents the backed-up GPO on the file system from which the settings should be imported.
migrationTable
Type: Microsoft.GroupPolicy.GPMigrationTableA GPMigrationTable object that holds the migration table.
statusMessages
Type: Microsoft.GroupPolicy.GPStatusMessageCollectionWhen this method returns, contains a GPStatusMessageCollection that holds status for the operation.
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. If there is no entry corresponding to a security principal or UNC path, it imports the setting that contains that security principal or UNC Path without modification from the GPO backup. It does not copy security on the GPO and Software Installation Package objects.
See Also
Import Overload
Gpo Class
Microsoft.GroupPolicy Namespace
Return to top