The -switch_primary_to_secondary flag must be defined if the secondary environment is active.
If the primary environment is not active and the -switch_primary_to_secondary is not used, the script exits without removing,and an error message appears.
If the -silent flag is not specified and optional parameters are not defined in the command line, the script asks for the relevant input interactively.