Gpo.Import Method (GpoBackup, GPStatusMessageCollection)
Imports the policy settings from a specified Group Policy object (GPO) backup and returns status.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Syntax
public Gpo Import(
GpoBackup gpoBackup,
out GPStatusMessageCollection statusMessages
)
public:
Gpo^ Import(
GpoBackup^ gpoBackup,
[OutAttribute] GPStatusMessageCollection^% statusMessages
)
member Import :
gpoBackup:GpoBackup *
statusMessages:GPStatusMessageCollection byref -> Gpo
Public Function Import (
gpoBackup As GpoBackup,
<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.
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 is null. |
See Also
Import Overload
Gpo Class
Microsoft.GroupPolicy Namespace
Return to top