This document describes how you can manage the Migration Center discovery client CLI.

## Before you begin

- Complete the steps to [download the `mcdc` CLI](https://docs.cloud.google.com/migration-center/docs/download-collector-cli).

## Automatic version check

By default, the `mcdc` CLI performs a version check once
every 24 hours. When you run the `mcdc` CLI and
a new version is available, a message is displayed which indicates that the
version of `mcdc` CLI that is available for you to upgrade
to. This version check requires an internet connection.

- When needed, configure a proxy to access the internet:


  ### Linux

  <br />

  ```
  ./mcdc config set proxy PROXY
  ```

  <br />

  ### Windows

  <br />

  ```
  mcdc.exe config set proxy PROXY
  ```

  <br />

  <br />

  Replace <var translate="no">PROXY</var> with the IP address of the HTTP or HTTPS proxy.
  For example, `127.0.0.1:7777` or `socks5://127.0.0.1:1234`.
- Deactivate the automatic version check by setting the
  `disable_version_checking` option:


  ### Linux

  <br />

  ```
  ./mcdc config set disable_version_checking true
  ```

  <br />

  ### Windows

  <br />

  ```
  mcdc.exe config set disable_version_checking true
  ```

  <br />

  <br />

## Manage configurations

You can manage the configuration properties by using the `config`
command.

- Print all configuration properties and their values:


  ### Linux

  <br />

  ```
  ./mcdc config list
  ```

  <br />

  ### Windows

  <br />

  ```
  mcdc.exe config list
  ```

  <br />

  <br />

- Print the value of a configuration property:


  ### Linux

  <br />

  ```
  ./mcdc config get PROPERTY_NAME
  ```

  <br />

  ### Windows

  <br />

  ```
  mcdc.exe config get PROPERTY_NAME
  ```

  <br />

  <br />

  Replace <var translate="no">PROPERTY_NAME</var> with the name of the property
  for which you want to print the value.
- Set a configuration property:


  ### Linux

  <br />

  ```
  ./mcdc config set proxy PROXY
  ```

  <br />

  ### Windows

  <br />

  ```
  mcdc.exe config set proxy PROXY
  ```

  <br />

  <br />

- Reset a configuration property to its default value:


  ### Linux

  <br />

  ```
  ./mcdc config unset proxy
  ```

  <br />

  ### Windows

  <br />

  ```
  mcdc.exe config unset proxy
  ```

  <br />

  <br />

## Manage usage statistics

The `mcdc` CLI sends pseudoanonymized usage information
that can help Google to prioritize discovery and assessment features and
improvements. These usage statistics are handled in accordance with
[Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice). This
section describes how you can change whether usage statistics are sent to
Google at any time after you've installed the `mcdc` CLI.

- Disable sending usage statistics:


  ### Linux

  <br />

  ```
  ./mcdc config set disable_usage_reporting true
  ```

  <br />

  ### Windows

  <br />

  ```
  mcdc.exe config set disable_usage_reporting true
  ```

  <br />

  <br />

- Enable sending usage statistics:


  ### Linux

  <br />

  ```
  ./mcdc config set disable_usage_reporting false
  ```

  <br />

  ### Windows

  <br />

  ```
  mcdc.exe config set disable_usage_reporting false
  ```

  <br />

  <br />

## Delete collected data from host machine

- After you've collected data and exported it to Migration Center or
  completed an offline assessment, you can delete the data from the local
  database:


  ### Linux

  <br />

  ```
  ./mcdc discover purge-db -db DATABASE_NAME
  ```

  <br />

  ### Windows

  <br />

  ```
  mcdc.exe discover purge-db -db DATABASE_NAME
  ```

  <br />

  <br />

  Replace <var translate="no">DATABASE_NAME</var> with the path to the database
  where the collected data is stored. Typically, it is in the same directory
  where you installed the `mcdc` CLI.

## What's next

- Learn how to [run an offline assessment](https://docs.cloud.google.com/migration-center/docs/run-offline-assessment).