1. Create or obtain the topology.json file either manually or by using external automation. When promoting from a dev/test environment to a stage/prod environment, you can obtain a topology.json file using the manage-topology export subcommand.
  2. If the server is not present in the topology JSON file, remove it from the topology, as follows:
    remove-defunct-server --topologyFilePath /path/to/topology.json \
      --ignore-online \
      --serverInstanceName instance-name
      --retryTimeoutSeconds 120

    For the sake of simplicity, LDAP bind options are omitted.