devices
Manage devices within your Code42 environment.
devices [OPTIONS] COMMAND [ARGS]...
bulk
Tools for managing devices in bulk.
devices bulk [OPTIONS] COMMAND [ARGS]...
deactivate
Deactivate all devices from the provided CSV containing a ‘guid’ column.
devices bulk deactivate [OPTIONS] CSV_FILE
Options
- --change-device-name
Prepend ‘deactivated_<current_date>’ to the name of any successfully deactivated devices.
- --purge-date <purge_date>
The date on which the archive should be purged from cold storage in yyyy-MM-dd format. If not provided, the date will be set according to the appropriate organization settings.
- -f, --format <format>
The output format of the result. Defaults to table format.
- Options
TABLE | CSV | JSON | RAW-JSON
- -d, --debug
Turn on debug logging.
- --totp <totp>
TOTP token for multi-factor authentication.
- --profile <profile>
The name of the Code42 CLI profile to use when executing this command.
Arguments
- CSV_FILE
Required argument
generate-template
Generate the CSV template needed for bulk device commands.
devices bulk generate-template [OPTIONS] [reactivate|deactivate|rename]
Options
- -p, --path <path>
Write template file to specific file path/name.
Arguments
- CMD
Required argument
reactivate
Reactivate all devices from the provided CSV containing a ‘guid’ column.
devices bulk reactivate [OPTIONS] CSV_FILE
Options
- -f, --format <format>
The output format of the result. Defaults to table format.
- Options
TABLE | CSV | JSON | RAW-JSON
- -d, --debug
Turn on debug logging.
- --totp <totp>
TOTP token for multi-factor authentication.
- --profile <profile>
The name of the Code42 CLI profile to use when executing this command.
Arguments
- CSV_FILE
Required argument
rename
Rename all devices from the provided CSV containing a ‘guid’ and a ‘name’ column.
devices bulk rename [OPTIONS] CSV_FILE
Options
- -f, --format <format>
The output format of the result. Defaults to table format.
- Options
TABLE | CSV | JSON | RAW-JSON
- -d, --debug
Turn on debug logging.
- --totp <totp>
TOTP token for multi-factor authentication.
- --profile <profile>
The name of the Code42 CLI profile to use when executing this command.
Arguments
- CSV_FILE
Required argument
deactivate
Deactivate a device within Code42. Requires the device GUID to deactivate.
devices deactivate [OPTIONS] DEVICE_GUID
Options
- --change-device-name
Prepend ‘deactivated_<current_date>’ to the name of the device if deactivation is successful.
- --purge-date <purge_date>
The date on which the archive should be purged from cold storage in yyyy-MM-dd format. If not provided, the date will be set according to the appropriate organization settings.
- -d, --debug
Turn on debug logging.
- --totp <totp>
TOTP token for multi-factor authentication.
- --profile <profile>
The name of the Code42 CLI profile to use when executing this command.
Arguments
- DEVICE_GUID
Required argument
list
Get information about many devices.
devices list [OPTIONS]
Options
- --active
Limits results to only active devices.
- --inactive
Limits results to only deactivated devices.
- --org-uid <org_uid>
Limit devices to only those in the organization you specify. Note that child organizations will be included.
- --include-backup-usage
Return backup usage information for each device (may significantly lengthen the size of the return).
- --include-usernames
Add the username associated with a device to the output.
- --include-settings
Include device settings in output.
- --include-legal-hold-membership
Include legal hold membership in output.
- --include-total-storage
Include backup archive count and total storage in output.
- --exclude-most-recently-connected <exclude_most_recently_connected>
Filter out the N most recently connected devices per user. Useful for identifying duplicate and/or replaced devices that are no longer needed across an environment. If a user has 2 devices and N=1, the one device with the most recent ‘lastConnected’ date will not show up in the result list.
- --last-connected-before <last_connected_before>
Include devices only when the ‘lastConnected’ field is after the provided value. Accepts a date/time in yyyy-MM-dd (UTC) or yyyy-MM-dd HH:MM:SS (UTC+24-hr time) format where the ‘time’ portion of the string can be partial (e.g. ‘2020-01-01 12’ or ‘2020-01-01 01:15’) or a ‘short time’ value representing days (30d), hours (24h) or minutes (15m) from the current time.
- --last-connected-after <last_connected_after>
Include devices only when ‘lastConnected’ field is after the provided value. Argument format options are the same as –last-connected-before.
- --created-before <created_before>
Include devices only when ‘creationDate’ field is less than the provided value. Argument format options are the same as –last-connected-before.
- --created-after <created_after>
Include devices only when ‘creationDate’ field is greater than the provided value. Argument format options are the same as –last-connected-before.
- --page-size <page_size>
Number of devices to retrieve per API call. Lower this value if you are getting timeouts when retrieving devices with backup info. Default: 100
- -f, --format <format>
The output format of the result. Defaults to table format.
- Options
TABLE | CSV | JSON | RAW-JSON
- -d, --debug
Turn on debug logging.
- --totp <totp>
TOTP token for multi-factor authentication.
- --profile <profile>
The name of the Code42 CLI profile to use when executing this command.
list-backup-sets
Get information about many devices and their backup sets.
devices list-backup-sets [OPTIONS]
Options
- --active
Limits results to only active devices.
- --inactive
Limits results to only deactivated devices.
- --org-uid <org_uid>
Limit devices to only those in the organization you specify. Note that child organizations will be included.
- --include-usernames
Add the username associated with a device to the output.
- --page-size <page_size>
Number of devices to retrieve per API call. Lower this value if you are getting timeouts when retrieving devices with backup info. Default: 100
- -f, --format <format>
The output format of the result. Defaults to table format.
- Options
TABLE | CSV | JSON | RAW-JSON
- -d, --debug
Turn on debug logging.
- --totp <totp>
TOTP token for multi-factor authentication.
- --profile <profile>
The name of the Code42 CLI profile to use when executing this command.
reactivate
Reactivate a device within Code42. Requires the device GUID to reactivate.
devices reactivate [OPTIONS] DEVICE_GUID
Options
- -d, --debug
Turn on debug logging.
- --totp <totp>
TOTP token for multi-factor authentication.
- --profile <profile>
The name of the Code42 CLI profile to use when executing this command.
Arguments
- DEVICE_GUID
Required argument
rename
Rename a device with Code42. Requires the device GUID to rename.
devices rename [OPTIONS] DEVICE_GUID
Options
- -n, --new-device-name <new_device_name>
Required The new name for the device.
- -d, --debug
Turn on debug logging.
- --totp <totp>
TOTP token for multi-factor authentication.
- --profile <profile>
The name of the Code42 CLI profile to use when executing this command.
Arguments
- DEVICE_GUID
Required argument
show
Print individual device details. Requires device GUID.
devices show [OPTIONS] DEVICE_GUID
Options
- -d, --debug
Turn on debug logging.
- --totp <totp>
TOTP token for multi-factor authentication.
- --profile <profile>
The name of the Code42 CLI profile to use when executing this command.
Arguments
- DEVICE_GUID
Required argument