We’re currently experiencing a high volume of support requests, which may result in longer response times — thank you for your patience and understanding.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This documentation is for the new preview UI. It’s still being refined and is subject to change. For documentation for the old UI, see Knowledge Base.

Article link copied to clipboard
Updated
Published
4 min read

Use the IT Agent Discovery to identify and track assets that connect to your network. You can install it interactively or silently, depending on your deployment needs.

Prerequisites

Supported operating systems

  • macOS 10.15 (current and previous release, x64). Rosetta is required on Apple Silicon until native ARM builds are available.

Install the agent

Recommended for most users.

  1. In your preferred site, go to Discovery > Systems > Download installers/packages.

  2. Select IT Agent Discovery > Download IT Agent disk image.

  3. Open the installation file.

    NOTE

    If the software is blocked, go to System Preferences > Security & Privacy > Open Anyways.

  4. In the setup wizard, choose an installation directory, then select Next.

  5. In your site, select Systems > Link discovery system > Create new code. Specify an expiration date, then select Apply and copy the generated code.

  6. Paste the copied linking code into the installer and select Next.

  7. Select Next again to start the installation.

  1. In your preferred site, go to Discovery > Systems > Download installers/packages.

  2. Select IT Agent Discovery > Download IT Agent package and Download IT Agent package silent installation configuration to download both files.

  3. In your site, select Systems > Link discovery system > Create new code. Specify an expiration date, then select Apply and copy the generated code.

  4. On your computer, open the downloaded IT Agent package silent installation configuration file.

  5. In the file, replace cloudtokenvalue with your copied linking code. If the computer requires a proxy server, remove the # for proxyserver=myproxyserver.domain.local and proxyport=8080.

    #!/bin/sh
    PreinstallConfig="/tmp/LansweeperITAgent-Preinstall.cfg" # Don't change this path!
    [ -f $PreinstallConfig ] && chmod 744 $PreinstallConfig
    cat > $PreinstallConfig << EOF
    mode=unattended
    accepteula=1
    path=/Library/Application Support/Lansweeper IT Agent Discovery
    cloudtoken=cloudtokenvalue
    #proxyserver=myproxyserver.domain.local 
    #proxyport=8080
    EOF
    chmod 744 $PreinstallConfig
  6. Enter the following command:

    sudo LansweeperITAgent-PreinstallScript_stable.sh
  7. Enter the following command, replacing X.X.X in Lansweeper-IT-agent-discovery-X.X.X with the version number of your installer.

    Installer version

    The version numbers for your installer can be found in your Lansweeper site. Go to Discovery > Download installers/packages > IT Agent Discovery > Version and locate your installer.

    sudo installer -pkg Lansweeper-IT-agent-discovery-X.X.X-osx-installer.pkg -target /
  1. In your preferred site, go to Discovery > Systems > Download installers/packages.

  2. Select IT Agent Discovery > Download IT Agent disk image to download the installer.

  3. In your site, select Systems > Link discovery system > Create new code. Specify an expiration date, then select Apply and copy the generated code.

  4. In an elevated command prompt, enter the following command to mount the DMG file:

    hdiutil attach Lansweeper-IT-agent-discovery-0.9.0-16-osx-installer.dmg
  5. To navigate the volume, enter:

    cd "/Volumes/Lansweeper IT Agent Discovery"
  6. Enter the following command, replacing X.X.X in Lansweeper-IT-agent-discovery-X.X.X-X-osx-installer.dmg with the version number of your installer. If the computer requires a proxy server, add parameters --proxyserver proxyserveraddress and --proxyport 8080.

    Installer version

    The version numbers for your installer can be found in your Lansweeper site. Go to Discovery > Download installers/packages > IT Agent Discovery > Version and locate your installer.

    sudo Lansweeper-IT-agent-discovery-X.X.X-X-osx-installer.app/Contents/MacOS/installbuilder.sh --mode unattended --accepteula 1 --path "/Library/Application Support/Lansweeper IT Agent Discovery" --cloudtoken cloudtokenvalue
  1. Copy the following script:

    #!/bin/bash
    # ==============================================
    # Lansweeper IT Agent Discovery Silent Installer (macOS)
    # ==============================================
    # --- 1. Set Cloud Token Variable ---
    CLOUDTOKEN="cloudtokenvalue"   # Replace with your linking code
    # --- 2. Define Download URLs ---
    INSTALLER_URL="https://download.lansweeper.com/stable/MAC/it-agent-discovery-pkg/latest"
    CONFIG_URL="https://download.lansweeper.com/stable/MAC/pkg-scripts/it-agent-discovery-stable/latest"
    # --- 3. Define Local File Paths ---
    WORKDIR="/tmp/lansweeper-install"
    INSTALLER_PKG="$WORKDIR/lansweeper-it-agent-discovery.pkg"
    CONFIG_SCRIPT="$WORKDIR/it-agent-config.sh"
    # --- 4. Prepare Work Directory ---
    rm -rf "$WORKDIR"
    mkdir -p "$WORKDIR"
    # --- 5. Download Installer and Config ---
    echo "Downloading Lansweeper IT Agent Discovery installer..."
    curl -L "$INSTALLER_URL" -o "$INSTALLER_PKG"
    echo "Downloading Lansweeper config script..."
    curl -L "$CONFIG_URL" -o "$CONFIG_SCRIPT"
    # --- 6. Insert Cloud Token into Config ---
    echo "Updating config script with cloud token..."
    sed -i.bak "s/cloudtokenvalue/$CLOUDTOKEN/g" "$CONFIG_SCRIPT"
    rm -f "$CONFIG_SCRIPT.bak"
    # --- 7. Run Silent Install ---
    echo "Running silent installation..."
    sudo installer -pkg "$INSTALLER_PKG" -target /
    # --- 8. Apply Config Script (if required by Lansweeper docs) ---
    echo "Applying configuration..."
    sudo bash "$CONFIG_SCRIPT"
    # --- 9. Cleanup ---
    rm -f "$INSTALLER_PKG"
    echo "Installer removed."
    echo " Lansweeper IT Agent Discovery installation completed."
  2. On your site, select Systems > Link discovery system > Create new code. Specify an expiration date, then select Apply and copy the generated code.

  3. In the first section of the script, replace cloudtokenvalue with your copied linking code.

  4. Save your file as a Bash script, for example: install-ls-it-agent.sh.

  5. Make the script executable by running: chmod +x install-ls-it-agent.sh.

  6. Run the script with elevated permissions: sudo ./install-ls-it-agent.sh.

Next steps

Now that your IT Agent is installed, you can create a discovery action to specify when discovery should occur.