Trying to parse data to collect info via code from inventory directly.
Basically from PowerShell I save the output
$compdata = PDQInventory GetComputer $compname
output is formatted like this (I shortened it a bit)
Name : compname
ID : number
Name : Microsoft Windows 11 Enterprise Insider Preview
Version : 10.0.22463.1000
Path : AD Path
Manufacturer : Dell Inc.
Model : Model
How do I go about converting this into a format that I can parse through and grab the name or ip like json?
I've tried to pipe ConvertTo-Json but the output I get is not as expected and I can't seem to parse it properly.
Please sign in to leave a comment.