-
Installation Guide
-
Admin Guides
-
User Guides
-
References
Print
Windows Inventory Collection Script
Copy the URL link to this section to share
Many customers have requested the ability to report on things that are either not collected or not accurately collected by Intune. In an effort to fill these gaps in we have implemented a custom solution to collect some of the most commonly requested items. Currently this list includes:
- Software installed on Windows 10 devices.
- Software installation date.
- Monitors (LCD’s) connected to Windows 10 devices.
- Disk health.
- Last Reboot time.
- Additional CPU details.
- Additional RAM details.
- Battery health.
- Friendly model names for Lenovo computers.
This data is collected via PowerShell, sent to a Log Analytics workspace, and then pulled into Power BI. Most customers leverage a Proactive Remediation detection to run the PowerShell script on a defined schedule. In this document we describe how to configure the script and deploy it using a Proactive Remediation however there are many ways that you might run a script on a schedule.
You can copy the PowerShell script from below.
Step
Step 1
- Paste the PowerShell code into your favorite script editor.
- On the line starting with $CustomerId = enter your Log Analytics Workspace ID between the quotes.
- On the line starting with $SharedKey = enter your Log Analytics Workspace Primary Key between the quotes.
- Save the script as a .ps1 file. For example CollectInventory.ps1.
Step
Step 5
Step
Step 6
- Optionally add Scope tags.
- Select Next.

Step