Skip to main content

Who is this article for?

Code42 for Enterprise
CrashPlan for Small Business

Code42 for Enterprise, yes.

CrashPlan for Small Business, no.

This article applies to Code42 cloud environments.

HOME
GETTING STARTED
RELEASE NOTES
FAQS
SYSTEM STATUS
Code42 Support

Manage legal hold custodians with the Code42 command-line interface

Who is this article for?

Code42 for Enterprise
CrashPlan for Small Business

Code42 for Enterprise, yes.

CrashPlan for Small Business, no.

This article applies to Code42 cloud environments.

Overview

The Code42 command-line interface (CLI) tool offers a way to interact with your Code42 environment without using the Code42 console or making API calls directly. For example, you can use it to manage custodians associated with legal hold matters. This article provides instructions for using the Code42 CLI to add and release custodians from legal hold matters. 

Before you begin

To manage legal hold custodians using the Code42 CLI, you must first install and configure the Code42 CLI following the instructions in Set up the Code42 command-line interface

Manage legal hold custodians

Once you create a legal hold matter in the Code42 console, you can use the Code42 CLI to add or release custodians from the matter.  

Use the legal-hold  commands to manage legal hold custodians.

  • To see a list of all the users currently in your organization, you can export a list from the Users action menu
  • To view a list of legal hold matters for your organization, including the matter ID, use the following command:  

    code42 legal-hold list

  • To see a list of all the custodians currently associated with a legal hold matter, enter code42 legal-hold show <matterID>.

Get CSV template

To add multiple custodians to a legal hold matter:

  1. Generate a CSV template. Below is an example command for generating a template to use to add custodians to legal hold matter. Once generated, the CSV file is saved to your current working directory.  

code42 legal-hold bulk generate-template add

To generate a template to use to remove custodians from a legal hold matter, for example: 

code42 legal-hold bulk generate-template remove

The CSV templates for adding and removing are the same. 

  1. Use the CSV template to enter the matter ID(s) and Code42 usernames for the custodians you want to add to the matters.
    To get the ID for a matter, enter code42 legal-hold list . 
  2. Save the CSV file. 

Add custodians to a legal hold matter  

You can add one or more custodians to a legal hold matter using the Code42 CLI.

Add multiple custodians

Once you have entered the matter ID and user information in the CSV file, use the bulk add-user command with the CSV file path to add multiple custodians at once. For example: 

code42 legal-hold bulk add-user /Users/astrid.ludwig/add_users_to_legal_hold.csv

Add a single custodian

To add a single custodian to a legal hold matter, use the following command as an example:

code42 legal-hold add-user --matter-id 123456789123456789 --username tanya.rowe@example.com  

Command Description
add-user Add a single custodian to a legal hold matter.   

--matter-id

The identification number of the legal hold matter. To get the ID for a matter, run the command code42 legal-hold list . 

--username The Code42 username of the custodian to add to the matter.
--profile

The profile to use to execute the command. (Optional)

If not specified, the default profile is used. 

Release custodians 

You can release one or more custodians from a legal hold matter using the Code42 CLI.

Release multiple custodians

To release multiple custodians at once:

  1. Enter the matter ID(s) and Code42 usernames to the CSV file template you generated.
  2. Save the file to your current working directory. 
  3. Use the bulk remove-user command with the file path of the CSV you created. For example:  

    code42 legal-hold bulk remove-user /Users/hope.rodriguez/remove_users_from_legal_hold.csv

Release a single custodian 

Use remove-user to remove a single custodian. For example: 

code42 legal-hold remove-user --matter-id  123456789123456789 --username mercedes.simmons@example.com

Command Description
remove-user Remove a single user from the alert rule.  

--matter-id

The identification number of the legal hold matter. To get the ID for a matter, run the command code42 legal-hold list . 

--username The Code42 username of the custodian to add to the matter.
--profile

The profile to use to execute the command. (Optional)

If not specified, the default profile is used. 

View matters and custodians

You can use the Code42 CLI to get a list of all the legal hold matters for your organization, or get full details for a matter. 

List legal hold matters

To view a list of legal hold matters for your organization, use the following command:  

code42 legal-hold list

This command produces the matter ID, name, description, creator, and creation date for the legal hold matters.

View matter details

To view active custodians for a legal hold matter, enter code42 legal-hold show with the matter ID, for example: 

code42 legal-hold show 123456789123456789

To view active custodians for a legal hold matter, as well as the details of the preservation policy, enter
code42 legal-hold show <matterID> --include-policy

To view all custodians (including inactive) for a legal hold matter, enter
code42 legal-hold show <matterID> --include-inactive