Drivers Inventory dashboard on devices with Intune and Log Analytics
In this post I will share with you a Log Analytics dashboard for drivers inventory allowing you to see all drivers installed on your devices
The solution
The script will get all non Microsoft drivers on each devices using the Win32_PNPSignedDriver WMI class.
It will be executed on each devices through a Remediation script.
This will resume in few steps:
- Creating a Remediation script
- Script is executed on all devices
- It will get installed drivers
- It will send info to Log Analytics
What shows the dashboard ?
The dashboard will display the below information in two tabs:
Drivers resume tab
- Devices count per models
- Devices count per drivers version
- Devices with drivers > 2 years
Drivers details tab
- Full details
- Drivers installed per models
- Drivers > 2 years (filter by device name)
- Older drivers (> 2 years)
- List of graphics drivers per models
- List of network drivers per models
Next step
Microsoft recently pushed the new Windows driver update management feature in Intune.
So next step will be to bind both this drivers inventiry workbook with the new driver feature from Intune.
This way you can have a list of drivers installed on each devices with current version new version available (if there is).
I will also bind this workbook to my BSOD workbook.
See here to get more info about the BSOD workbook.
More info about Log Analytics
If you want to get more info about Log Analytics, check here my blog series about Learning Log Analytics from scratch.
I will also speak at the MEM Summit 2023 in Paris about this topic, see below.
Get the files
Click on the below GitHub picture to get required below files:
- DriversInventory_workbook.json
- Detection_script.ps1
How it looks like ?
The workbook is divided in 2 tabs:
- Drivers resume & Details
The Log Analytics workbook will display below information:
- Count of devices inventoried
- Count of models inventoried
- Count of manufacturers inventoried
- Devices count per models
- Devices count per drivers version
- Devices with drivers > 2 years
- Full details
- Drivers installed per models
- Drivers > 2 years (filter by device name)
- Older drivers (> 2 years)
- List of graphics drivers per models
Log Analytics information
In order to create this report we will need to add some information relative to the Log Analytics workspace in the PS1 script.
See below required info:
- Workspace ID
- Primary key
To get those information go to Log Analytics Workspace > Agents management
You will find both Workspace ID and Primary key.
Then we will proceed as below:
1. Open the file Detection_script.ps1
2. Fill below variables:
- $CustomerID: workspace ID
- $ShareKey: Primary key
Creating the Remediation script
1. Go to the Intune portal
2. Go to Devices
3. Go to Remediations
4. Click on Create script package
5. Type a name
6. Click on Next
7. Click on Detection script file
8. Browse the script Detection_script.ps1
9. Click on Next
10. Click on Next
11. Click on Create
Adding the workbook
In this part we will add the report.
The report can be downloaded on GitHub, lin mentioned above.
The report is the file: DriversInventory_workbook.json
To add it, proceed as below:
1. Go to the Azure portal
2. Go to Log Analytics workspace
3. Go to workbook
4. Click on New
5. Go to Advanced editor, at the top
6. Remove content
7. Go to the GitHub link, there
8. Click on the copy button as below:
9. Click on Apply
10. Click on Done editing then Save
6 commentaires
Keep getting this error in log analytics:
Query could not be parsed at ')' on line [8,32]
Token: ')' Line: 8 Postion: 32
i can't see anything wrong.
Any suggestions?
Thank you!
Same here, also the error:
Query could not be parsed at ')' on line [8,32]
Token: ')' Line: 8 Postion: 32
Any suggestion?
Please send me a mail at damien.vanrobaeys@gmail.com for your issues
I think you may have this issue because the remediation script hasn't been executed yet on a device meaning the custom log does not exist.
Check in Logs if the logs DriversInventory_CL exists, if not that's why you have the issue.
Send me mail at damien.vanrobaeys@gmail.com if the issue still occurs.
Hello Damien,
first of all, thank you for your inspiring work.
I've tried to implement your solution, but I can't see anything in the workbook. I don't have any errors in particular, but I don't have any data displayed. Do you have any idea what I might have missed?
Hi Constant, could you please send me a mail at
damien.vanrobaeys@gmail.com ?
Enregistrer un commentaire