Skip to main content

Install the Windows Agent from the Command Line

Install with a Configuration File

To install the Windows Agent on multiple hosts, Lacework recommends that you create a configuration file. Follow these steps:

  1. Download the Windows agent MSI package using the instructions in Download Windows Agent Installer.

  2. Create a config.json file on your host using a text editor.

    note

    Do not create the config.json file in the C:\ProgramData\Lacework\ directory where the Windows agent components are installed.

  3. Copy the following into the config.json file:

    {
    "tokens": {
    "accesstoken": "Your_Access_Token"
    },
    "serverurl": "Your_API_Endpoint"
    }
  4. Specify the agent access token in the "accessToken":"Your_Access_Token line, where Your_Access_Token is the character string that identifies the specific access token to use with the agent. Obtain the access token using the instructions in Windows Agent Installation Prerequisites.

  5. Specify the Lacework agent server URL in the "serverurl":"Your_API_Endpoint line, where Your_API_Endpoint is the agent server URL. For more information, see serverurl Property.

  6. To disable automatic upgrade, see Automatic Upgrade of Windows Agent. By default, the agent is automatically upgraded when a new version is available.

  7. Save the config.json file in the ASCII format and note the location of the file.

  8. Open a PowerShell terminal as an administrator.

  9. Navigate to the directory containing the Windows agent MSI package on your host.

  10. Run the MSI package using the following command in the PowerShell command line:

    C:\Users\Administrator> msiexec.exe /i LWDataCollector.msi CONFIGFILE=C:\path\to\config.json

    Where C:\path\to\config.json is the file path for the config.json file.

    An installation wizard appears.

  11. Complete the installation using the installation wizard.

    The config.json file is copied to the C:\ProgramData\Lacework\ directory. You can modify this file to change the settings for the agent. If you modify the file, you must restart the agent for the changes to take effect. For more information, see Restart Windows Agent.

note

For unattended installations, include the /qn parameter when you run the install command in the PowerShell command line:

C:\Users\Administrator> msiexec.exe /i LWDataCollector.msi CONFIGFILE=C:\path\to\config.json /qn

Install without a Configuration File

For single host installations, instead of specifying configuration parameters for the agent installation in the config.json configuration file, you can enter the parameters directly in the command line. Follow these steps:

  1. Download the Windows agent MSI package using the instructions in Download Windows Agent Installers.

  2. Open a PowerShell terminal as administrator.

  3. Navigate to the folder containing the MSI package file on your host.

  4. Run the installer using the following command in the PowerShell command line:

    C:\Users\Administrator> msiexec.exe /i LWDataCollector.msi ACCESSTOKEN=Your_Access_Token SERVERURL=Your_API_Endpoint

    Where:

    By default, the agent is automatically upgraded when a new version is available. To disable automatic upgrade, use the AUTOUPGRADE=disabled option. For example:

    C:\Users\Administrator> msiexec.exe /i LWDataCollector.msi ACCESSTOKEN=Your_Access_Token SERVERURL=Your_API_Endpoint AUTOUPGRADE=disabled

    note

    For improved security and to use new and enhanced features, Lacework recommends that you do not disable automatic upgrade.

  5. An installation wizard appears. Complete the installation using the installation wizard.

    A config.json file that contains the options you specified in the command line is created in the C:\ProgramData\Lacework\ directory. You can modify this file to change the settings for the agent. If you modify the file, you must restart the agent for the changes to take effect. For more information, see Restart Windows Agent.

note

For unattended installations, include the /qn parameter when you run the install command in the PowerShell command line:

C:\Users\Administrator> msiexec.exe /i LWDataCollector.msi ACCESSTOKEN=Your_Access_Token SERVERURL=Your_API_Endpoint /qn