Skip to main content

Install Windows Agent through the Command Line

For single host installations, install the Windows agent using the command line. Instead of specifying configuration parameters for the agent installation in the config.json file, you specify them directly in the command line.

  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 benefit from new and improved features, Lacework recommends that you do not disable automatic upgrade of the agent.

  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.