--- title: "Adding commands to profiles using the CLI" slug: "adding-commands-to-profiles-using-the-cli-2" updated: 2026-08-25T21:18:10Z published: 2026-08-25T21:18:10Z canonical: "docs.trellix.com/adding-commands-to-profiles-using-the-cli-2" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Adding commands to profiles using the CLI Use the commands in this section to add commands to a profile. To add individual commands to a profile: 1. Enable the CLI configuration mode. ``` hostname > enable hostname # configure terminal ``` 2. Add a command and specify its sequence: ``` hostname (config) # cmc profile command "" ``` where: - `profileName `is the name of an existing or new profile. (If the profile does not exist, it will be created.) - `sequenceNumber `is an integer that controls the order in which the commands within the profile will be executed. The command with the smallest sequence number is executed first. - `command `is the CLI command. It must be enclosed in double quotation marks. 3. Repeat the previous step for each command you want to include. 4. Verify your changes: ``` hostname (config) # show cmc profiles ``` 5. Save your changes: ``` hostname (config) # write memory ``` To extract commands from a running configuration and add them to a profile: ### Important Some commands in the running configuration may be incompatible with a different product type or appliance model. Review the commands to determine if they are compatible before you apply a profile using this command. 1. Enable the CLI configuration mode: ``` hostname > enable hostname # configure terminal ``` 2. Specify the empty profile and the appliance from which to extract the commands: ``` hostname (config) # cmc profile extract-from-appliance ``` where` profileName `is the name of an empty profile, and` applianceName `is the name of the appliance from which the commands from the running configuration will be extracted. 3. Verify your change: ``` hostname (config) # show cmc profiles ``` 4. Save your change: ``` hostname (config) # write memory ``` To copy a profile: 1. Enable the CLI configuration mode: ``` hostname > enable hostname # configure terminal ``` 2. Specify the names of the source profile and the target (new) profile: ``` hostname (config) # cmc profile copy ``` where` sourceProfileName `is the original profile and` targetProfileName `is the new profile. 3. Verify your change: ``` hostname (config) # show cmc profiles ``` 4. Save your change: ``` hostname (config) # write memory ``` ### Examples ###### Manually adding commands This example populates the "acctmgt" profile with commands that will add an Operator3 user account to the appliances to which it is applied. ``` hostname (config) # cmc profile acctmgt command 1 "username Operator3 role operator" hostname (config) # cmc profile acctmgt command 2 "username Operator3 password evtk*643U" hostname (config) # show cmc profiles acctmgt Profile acctmgt   Comment:   Commands:      1. username Operator3 role operator      2. username Operator 3 password evtk*643U ``` ###### Adding commands extracted from the configuration of another appliance This example extracts commands from the EX-03 appliance running configuration, populates the "general" profile with them, and applies them to the EX-05 appliance. The output indicates that the **no fenet check-certificate** command could not be executed. ``` hostname (config) # cmc profile extract extract-from appliance EX-03 hostname (config) # cmc profile general apply appliance EX-05 ====================Appliance EX-05========================== Execution was successful. Execution output: %Disabling certificate checking is not allowed. Saving configuration file...Done! ``` :