Retrieve value from computer via powershell ans put it in inventory
Hi,
I wanted to retreive the Windows Defender signature version and the date it was last updated. I can retrieve this via a registry scan. The update date is in binary format so this is pretty useless in this form. Is there a way to return a value via powershell, for instance via this command:
[datetime]::FromFileTime([BitConverter]::ToInt64((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Defender\Signature Updates').SignaturesLastUpdated,0))
and put this in a custom field or variable, or some other place so that I can build a collection with it?
regards,
Guy
Comments
We are planning on adding a PowerShell scanner to PDQ Inventory that would allow you to do things like this, but I have no ETA on when it will be ready. In the meantime, one thing you can try is to write a PowerShell script that stores your converted data in WMI, run that script with Deploy, and set the Scan Profile on that package to a WMI scanner.
Here's a rough proof-of-concept script I found in my notes for storing data in WMI: