< Back

Copy-JCAssociation

Thu Jan 16, 2020 8:47 am

NAME Copy-JCAssociation



SYNOPSIS

Copy the associations from one object to another.





SYNTAX

Copy-JCAssociation [-Type] {command | ldap_server | policy | application | radius_server | system_group | system |

user_group | user | g_suite | office_365} [-Id] <System.String[]> [[-TargetId] <System.String>] [[-TargetName]

<System.String>] [[-RemoveExisting]] [[-IncludeType] {user_group | system | system_group | user | policy | command

| application | g_suite | ldap_server | office_365 | radius_server}] [[-ExcludeType] {user_group | system |

system_group | user | policy | command | application | g_suite | ldap_server | office_365 | radius_server}]

[-Force] [<CommonParameters>]



Copy-JCAssociation [-Type] {command | ldap_server | policy | application | radius_server | system_group | system |

user_group | user | g_suite | office_365} [-Name] <System.String[]> [[-TargetId] <System.String>] [[-TargetName]

<System.String>] [[-RemoveExisting]] [[-IncludeType] {user_group | system | system_group | user | policy | command

| application | g_suite | ldap_server | office_365 | radius_server}] [[-ExcludeType] {user_group | system |

system_group | user | policy | command | application | g_suite | ldap_server | office_365 | radius_server}]

[-Force] [<CommonParameters>]





DESCRIPTION

This cmdlet will get the associations of an existing object and will copy those same associations over to a new

object.





PARAMETERS

-ExcludeType <System.String[]>

Specify the association types to exclude from the copy.



Required? false

Position? 15

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Force <System.Management.Automation.SwitchParameter>

Bypass user prompts and dynamic ValidateSet.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Id <System.String[]>

The unique id of the object.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-IncludeType <System.String[]>

Specify the association types to include in the copy.



Required? false

Position? 14

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <System.String[]>

The name of the object.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-RemoveExisting <System.Management.Automation.SwitchParameter>

Removes the existing associations while still adding the new associations.



Required? false

Position? 13

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TargetId <System.String>

The unique id of the target object.



Required? false

Position? 10

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TargetName <System.String>

The name of the target object.



Required? false

Position? 11

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Type <System.String>

The type of the object.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String





System.Management.Automation.SwitchParameter





System.String[]







OUTPUTS

System.Object







NOTES









-------------------------- Example 1 --------------------------



PS C:\\> Copy-JCAssociation -Type:('user') -Id:('5cdaef60452f26365ca1fbd0') -TargetId:('5cdaef62de6bf35ce44ad777')



The command will remove all of 5cdaef62de6bf35ce44ad777 associations and will copy all of 5cdaef60452f26365ca1fbd0

associations to 5cdaef62de6bf35ce44ad777.

-------------------------- Example 2 --------------------------



PS C:\\> Copy-JCAssociation -Type:('user') -Name:('John') -TargetName:('Jim')



The command will remove all of Jim's associations and will copy all of John's associations to Jim.



RELATED LINKS

Online Version: https://github.com/TheJumpCloud/support ... ssociation