cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
papillon68000
Engaged Sweeper

Hello, I am looking for a report in Lansweeper to get all installed Linux distributions on Windows Subsystem for Linux. Until now I only can see where WSL is activated by running a Windows installed Features report ( https://www.lansweeper.com/report/installed-windows-features/ ) and then filter by the WSL feature. But I also want to know which Linux distributions are installed ( wsl.exe --list -v ) in these WSL instances.

1 ACCEPTED SOLUTION
KrisK
Lansweeper Tech Support
Lansweeper Tech Support

Unfortunately, the MS Store is the only place where this information can be found in Lansweeper right now. You could automate it somewhat by providing a list of known distro's in the query, for example:

Select Top 1000000 tblAssets.assetid,
  tblAssets.AssetName,
  tsysOS.Image As icon,
  tblSoftwareUni.softwareName As Software,
  tblSoftware.softwareVersion As Version,
  tblAssets.Domain,
  tblAssets.Username,
  tblAssets.Userdomain,
  tblAssets.IPAddress,
  tblAssets.Description,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  tblAssetCustom.Location,
  tsysIPLocations.IPLocation,
  tsysOS.OSname As OS,
  tblAssets.SP As SP,
  tblAssets.OScode + '.' + tblAssets.BuildNumber As Build,
  tblAssets.Version As [OS Version],
  tblAssets.Firstseen As [Created at],
  tblAssets.Lastseen As [Last successful scan]
From tblSoftware
  Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
  Inner Join tblAssetCustom On tblSoftware.assetid = tblAssetCustom.AssetID
  Inner Join tblAssets On tblAssets.AssetID = tblSoftware.assetid
  Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
  Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where (tblSoftwareUni.softwareName Like '%ubuntu%' Or
    tblSoftwareUni.softwareName Like '%suse%' Or tblSoftwareUni.softwareName
    Like '%debian%' Or tblSoftwareUni.softwareName Like '%kali%') And
  tblAssetCustom.State = 1
Order By tblAssets.AssetName

 

View solution in original post

5 REPLIES 5
papillon68000
Engaged Sweeper

Meanwhile I have added many more of the distrubution names from the MS app store. So as long as the distribution name is known, this kind of filter is fine. But it is not able to detect 'new' distributions and it also can not detect not well registered distributions and for some reasons it displays distributions which already have been uninstalled/deregistered. In the past I tested some WSL distributions which were not displayed in the system-control / app control panel but they were seen with the "wsl --list" command. These ones would not be detected by this report.

papillon68000
Engaged Sweeper

"right now" is nice to hear, so you may have this point on your radar for future enhancement.

Thanks for this report, I have enhanced it with keywords from MS store to identify more WSL distributions, so basically this works. But one must also consider that WSL also allows to sideload Linux distribution aside from MS store., so if one missed to define them in the lansweeper report, they will not be found. So does for example "Docker Desktop" for WSL can be downloaded from website and one can install it into WSL by starting that EXE, it's not in the store. If I would not know that Docker Desktop is used here I would not come to the idea to add it into the LS report. So it would stay undedected, %docker desktop% helps...

papillon68000
Engaged Sweeper

Yes, it is possible that way. But it is still a very manual process, I need to know which distributions could be there and then actively search them. I would prefer an automatic report which also finds more exotic ones than Ubuntu, Suse, Debian and Kali.

KrisK
Lansweeper Tech Support
Lansweeper Tech Support

Unfortunately, the MS Store is the only place where this information can be found in Lansweeper right now. You could automate it somewhat by providing a list of known distro's in the query, for example:

Select Top 1000000 tblAssets.assetid,
  tblAssets.AssetName,
  tsysOS.Image As icon,
  tblSoftwareUni.softwareName As Software,
  tblSoftware.softwareVersion As Version,
  tblAssets.Domain,
  tblAssets.Username,
  tblAssets.Userdomain,
  tblAssets.IPAddress,
  tblAssets.Description,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  tblAssetCustom.Location,
  tsysIPLocations.IPLocation,
  tsysOS.OSname As OS,
  tblAssets.SP As SP,
  tblAssets.OScode + '.' + tblAssets.BuildNumber As Build,
  tblAssets.Version As [OS Version],
  tblAssets.Firstseen As [Created at],
  tblAssets.Lastseen As [Last successful scan]
From tblSoftware
  Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
  Inner Join tblAssetCustom On tblSoftware.assetid = tblAssetCustom.AssetID
  Inner Join tblAssets On tblAssets.AssetID = tblSoftware.assetid
  Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
  Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where (tblSoftwareUni.softwareName Like '%ubuntu%' Or
    tblSoftwareUni.softwareName Like '%suse%' Or tblSoftwareUni.softwareName
    Like '%debian%' Or tblSoftwareUni.softwareName Like '%kali%') And
  tblAssetCustom.State = 1
Order By tblAssets.AssetName

 

KrisK
Lansweeper Tech Support
Lansweeper Tech Support

@papillon68000 

On client systems, you can find installed WSL distributions in the list of installed MS Store apps. For example, for Ubuntu and Suse:

wsl.png

This feature requires the SOFTWAREMSSTOREAPPS scanning item to be enabled on the Scanning/Scanned Item Interval page.

Not sure this approach will work on servers without MS Store though.