Retrieve value from computer via powershell ans put it in inventory


1 comment

  • Colby Bouma

    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:


    param (
    [string]$Namespace = "root\CIMV2"

    $NewClass = New-Object System.Management.ManagementClass("$Namespace", [String]::Empty, $null)

    $NewClass["__CLASS"] = "$ClassName"
    $NewClass.Qualifiers.Add("Static", $true)

    ForEach ( $Property in $Properties ) {

    $NewClass.Properties.Add("$Property", [System.Management.CimType]::String, $false)
    $NewClass.Properties["$Property"].Qualifiers.Add("Key", $true)


    Comment actions Permalink

Please sign in to leave a comment.