
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2020 10:22 AM
We use Windows 10 Pro and Enterprise currently
If anyone could assist with this.
Thankyou
- Labels:
-
General Discussion

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 11:28 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 02:31 AM
I might continue creating my report.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 12:58 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 02:19 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 12:11 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2020 12:31 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2020 07:13 AM
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/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2020 02:20 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2020 03:31 AM
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.
