Search our knowledgebase

How to scan Windows computers with LsClient.exe

Last updated on September 06 2017
 From Lansweeper version onward, LsClient is no longer supported and no longer works. This tool is no longer included in Lansweeper installations and use of older versions of LsClient will result in the error below. LsClient has been discontinued in favor of the more powerful and more secure LsPush scanning agent.

Connection to server failed

Although the name would suggest otherwise lsclient.exe is no real client or agent. 
Basically it just sends a message to the server “hello, I’m here, scan me on this IP Address” and stops working.
The service processes this request and starts scanning the client when ready.

All the scanning is done by the lansweeper service.

Lsclient.exe can be found in your installation folder

Usage: Lsclient.exe “name of server where the service is installed”

As a test we try from the command prompt:

“C:\Program Files\lansweeper\Client\lsclient.exe” myserver
“C:\Program Files\lansweeper\Client\lsclient.exe” myserver /showresult

If you have problems with DNS resolution or want to use lsclient from a DMZ or VPN connection you can use the /scanonIP switch.

Lansweeper service will try to scan the client machine on the IP address it connected from instead of looking up the hostname in DNS.

Using lsclient in a standard login script

In this example the startup script is called “startup.cmd”


Contents of the startup.cmd

%logonserver%\netlogon\lsclient.exe myserver

Now copy the lsclient.exe to your netlogon folder.

Deploying lsclient by using a GPO

More technical info on:

Make sure that you use a logon script instead of a startup script because this is running in the context of the user.

A sample vbs script that runs the lsclient hidden could look like this:

Set WshShell = CreateObject("WScript.Shell") "%logonserver%\netlogon\lsclient.exe myserver",0