cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
woodyhardwood
Engaged Sweeper
Hi all I am new to Lansweeper and I have done a search but couldn't find what I want to do. I want to be able to pickup Simcard Info and IEMI on our devices that we currently scan.

We use Windows 10 Pro and Enterprise currently

If anyone could assist with this.

Thankyou
11 REPLIES 11
ghelpdesk
Champion Sweeper
The report is linked to a deployment using the after scanning schedule so after an asset is scanned if it lists in the report it will then have the script deployed.
CyberCitizen
Honored Sweeper
Thank you, not quite what I was expecting. Was expecting something like if Registry Key not found report that could be used for scheduled deployments. Eg filtered via OU's and make/model etc.

I might continue creating my report.
CyberCitizen
Honored Sweeper
Can you share your SQL / Deployment Report?

Just interested in how you're filtering the registry info.

I have done it with files, registry I am having a look at but always find it helpful to analyse code.
CyberCitizen wrote:
Can you share your SQL / Deployment Report?

Just interested in how you're filtering the registry info.

I have done it with files, registry I am having a look at but always find it helpful to analyse code.


The below lists assets seen in the last hour with a scanned IMEI registry value that is not 15 chars long (expected IMEI length).

We also filter based on OU and model types which I've removed to simplify the report.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
DateDiff(n, tblAssets.Lastseen, GetDate()) As MinutesSinceLastScanned,
tblIMEI.IMEI
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join (Select tblRegistry.AssetID,
tblRegistry.Value As IMEI
From tblRegistry
Where tblRegistry.Valuename Like 'IMEI' And Len(tblRegistry.Value) <>
15) tblIMEI On tblAssets.AssetID = tblIMEI.AssetID
Where tblAssetCustom.State = 1 And
DateDiff(n, tblAssets.Lastseen, GetDate()) < 60
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
DateDiff(n, tblAssets.Lastseen, GetDate()),
tblIMEI.IMEI
ghelpdesk
Champion Sweeper
There are 3 steps in the package. 1st grabs the IMEI. 2 & 3 catch error states. You might not need steps 2/3 but we found it helped see laptops with wwansvc service issues.

Lansweeper scans regpath HKLM\Software\IMEI and regvalue IMEI.

The package itself runs "after scanning" based off a report listing laptop assets with no value (or an error value) in the IMEI registry key.

Step1
cd %tmp% & netsh mbn sh int > imei.txt & if %errorlevel%==0 (findstr /l " Id " imei.txt > id.txt & for /f "tokens=3 delims=: " %a in (id.txt) do (reg add HKLM\Software\IMEI /v imei /t REG_SZ /d %a /f)) & del /f id.txt & del /f imei.txt

Step2
cd %tmp% & netsh mbn sh int > imei.txt & if %errorlevel%==0 (for /f "tokens=*" %a in (imei.txt) do (if "%a"=="There is no Mobile Broadband interface" (reg add HKLM\Software\IMEI /v imei /t REG_SZ /d "%a" /f))) & del /f imei.txt

Step3
cd %tmp% & netsh mbn sh int > imei.txt & if %errorlevel%==0 (for /f "tokens=*" %a in (imei.txt) do (if "%a"=="Mobile Broadband Service (wwansvc) is not running." (reg add HKLM\Software\IMEI /v imei /t REG_SZ /d "%a" /f))) & del /f imei.txt
ghelpdesk wrote:
There are 3 steps in the package. 1st grabs the IMEI. 2 & 3 catch error states. You might not need steps 2/3 but we found it helped see laptops with wwansvc service issues.
Lansweeper scans regpath HKLM\Software\IMEI and regvalue IMEI.


Thanks for that dude, that will save me some work, plus by DOS writing skills are basic especially with stringing it all together, so thank you for that.
CyberCitizen
Honored Sweeper
Official Response From Lansweeper Support: Unfortunately, since IMEI information is not stored in the WMI on Windows machines, it's indeed not possible for Lansweeper to scan this value. Since IMEI scanning is not a built-in feature at this moment, we've added this ticket to our customer wish list as a feature request. Features on the customer wish list are prioritized based on a combination of customer demand and difficulty to implement. As such we can unfortunately not guarantee this will be implemented or provide you with an expected release date.

However, if this information is stored in the registry, it could be possible to report on this through registry scanning. More information on reporting based on registry keys is available here: https://www.lansweeper.com/knowledgebase/report-based-on-registry-keys/

An alternative way to gather this information could be by using a deployment package with a script utilizing your command to write the data to a specific file. Unfortunately, while this could potentially provide a workaround, we can not provide support for creating custom scripts or packages.

Do note that Lansweeper should be able to scan the IMEI number if you're using Microsoft Intune with these devices. Provided the Intune scanning requirements are met. More details regarding this are available here: https://www.lansweeper.com/knowledgebase/intune-scanning-requirements/
ghelpdesk
Champion Sweeper
We run the command CyberCitizen mentions and save the value into a registry key that Lansweeper scans so we can then reference in Lansweeper reporting and also drive automated deployment of the package if the value is not known (and the model is expected to have an IMEI value).
ghelpdesk wrote:
We run the command CyberCitizen mentions and save the value into a registry key that Lansweeper scans so we can then reference in Lansweeper reporting and also drive automated deployment of the package if the value is not known (and the model is expected to have an IMEI value).


Hey ghelpdesk,

Are you able to share your code, I would be interested to see how you're querying the key and writing it to the registry. I have been meaning to set this up, just haven't had the time to sit down and script it.