--- title: "Specifying initial settings using the Windows Hyper-V set_keys.ps1 PowerShell script" slug: "specifying-initial-settings-windows-hyper-v-set-keys-ps1-powershell-script-1" tags: ["Endpoint Security (HX)", "Product Usage"] updated: 2026-09-10T17:37:59Z published: 2026-09-10T17:37:59Z canonical: "docs.trellix.com/specifying-initial-settings-windows-hyper-v-set-keys-ps1-powershell-script-1" --- > ## 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. # Specifying initial settings using the Windows Hyper-V set_keys.ps1 PowerShell script The `set_keys.ps1` PowerShell script is included in the Endpoint Security (HX) Hyper-V deployment package you received. Trellix recommends that you use this PowerShell script to do at least the following: - Enter the activation code for your virtual server. The activation code contains many characters. You cannot copy and paste the activation code into the Hyper-V console, and it is easy to make a typing error. - Reset the password for the `admin` user, if password authentication will be used to log into the CLI or Web UI over the network. The password must be changed to a password of at least eight characters. You can also use this script to provide initial commands for configuration settings that the system will apply during the initial boot. This can be convenient if you have a large number of virtual servers to deploy, because you can create base sets of commands and then customize them for each deployment. To use the `set_keys.ps1` PowerShell script: 1. Use Remote Desktop (RDP) to connect to your Hyper-V virtual machine. Make sure you are logged in as an administrator. 2. Change to the directory on your virtual machine where the Endpoint Security (HX) Hyper-V deployment `.zip` file was extracted during installation. 3. Open the `set_keys.ps1` PowerShell script in the directory using a text editor (such as Notepad). 4. Change appropriate settings in the `set_keys.ps1` script, specifying your values in quotation marks for each setting. The following table describes the settings in the `set_keys.ps1` script that you can change. They are all located between the comments `MODIFY THESE AS NEEDED` and `DON'T MODIFY ANYTHING BELOW` in the file. Do not change any other settings in the PowerShell script. | Field | Description | | --- | --- | | `activation_code` | The code you received in a secure email from Trellix that gives the virtual server its identity and access credentials. | | `cli_cmds_init` | A set of commands that, at a minimum, allow the server to connect to your network. Type the commands in plain-text format and then paste the encoded string into this field. Consider using this field for network connectivity only, because the size of the string could become unwieldy. The string contain multiple lines. | | `cli_cmds_init_url` | A URL that points to a file on your network (for example,` http://acme.com/operations/4500V_config.txt`). To use this field, create a text file that includes CLI commands that configure additional settings in plain-text format, and store the file on an HTTP server in your network. The virtual server needs network connectivity (which the commands in the `cli_cmds_init` setting can establish) to access the file referenced in the URL. | | `reset_admin_password` | A password of at least eight characters. The initial `admin` password must be reset to allow the admin user to log into the CLI or Web UI over the network unless both of the following are true: - The CLI commands being executed set an SSH authorized key for the admin use, which allows the admin to log in remotely without a password. - You disable password login using the `username admin disable password` command. | | `$vmName` | If you changed the name of the virtual machine during installation, specify the correct virtual machine name. | 5. Save the file. 6. From the directory on your virtual machine where the Endpoint Security (HX) Hyper-V deployment `.zip` file was extracted during installation, enter Windows PowerShell. ``` : powershell ``` 7. Run the PowerShell script. ``` : .\set_keys.ps1 ``` The script applies the values you specified Step 4 to your virtual server. 8. After the PowerShell script has run, access the virtual server console and run the configuration wizard to complete the configuration of the virtual machine. See [Initial Configuration Using the Windows Hyper-V Server Console on page 1](/docs/initial-configuration-using-the-windows-hyper-v-server-console-1) and [Configuration Wizard Steps on page 1.](/docs/configuration-wizard-steps-1) :