Gpo.CopyTo Method (GPDomain, String, Boolean, GPMigrationTable)

 

Copies the Group Policy object (GPO) to a destination GPO.

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

Syntax

public Gpo CopyTo(
    GPDomain targetDomain,
    string newDisplayName,
    bool copyAcl,
    GPMigrationTable migrationTable
)
public:
Gpo^ CopyTo(
    GPDomain^ targetDomain,
    String^ newDisplayName,
    bool copyAcl,
    GPMigrationTable^ migrationTable
)
member CopyTo : 
        targetDomain:GPDomain *
        newDisplayName:string *
        copyAcl:bool *
        migrationTable:GPMigrationTable -> Gpo
Public Function CopyTo (
    targetDomain As GPDomain,
    newDisplayName As String,
    copyAcl As Boolean,
    migrationTable As GPMigrationTable
) As Gpo

Parameters

  • newDisplayName
    Type: System.String

    The display name of the destination GPO. This name cannot already exist in the domain.

  • copyAcl
    Type: System.Boolean

    true to copy the Access Control list (ACL) of the source GPO to the destination GPO; otherwise false.

Return Value

Type: Microsoft.GroupPolicy.Gpo

Returns Gpo. The destination GPO.

Exceptions

Exception Condition
ArgumentException

newDisplayName is an empty string (“”).

ArgumentNullException

The targetDomain parameter or the newDisplayName parameter is null

See Also

CopyTo Overload
Gpo Class
Microsoft.GroupPolicy Namespace

Return to top