/build/static/layout/Breadcrumb_cap_w.png

Collecting monitor information and attaching to an asset?

I found a slick little powershell script that will return the make, model, and serial number of monitors attached to a computer.

I would love to be able to run this script and return the results as additional assets and information in asset management.

The script looks like this:

function Decode {
    If ($args[0] -is [System.Array]) {
        [System.Text.Encoding]::ASCII.GetString($args[0])
    }
    Else {
        "Not Found"
    }
}

echo "Name, Serial"

ForEach ($Monitor in Get-WmiObject WmiMonitorID -Namespace root\wmi) {  
    $Name = Decode $Monitor.UserFriendlyName -notmatch 0
    $Serial = Decode $Monitor.SerialNumberID -notmatch 0
    $Manufacturer = Decode $Monitor.ManufacturerName -notmatch 0
    $User = $Monitor.PSComputerName 
	
    echo "$User, $Manufacturer, $Name, $Serial"
}

... and the output looks like this:

COMPUTERNAME, VSC             , VP2765 SERIES, SHK16286****    
COMPUTERNAME, VSC             , VP2765 SERIES, SHK16286****

So, this is exactly the information that I want to bind to my asset management...  the manufacturer, model, and serial number of monitors attached to the assets.  Perhaps under "Related Assets" would be ideal..

I got this far... but I'm completely lost when it comes to actually making KACE gather this information on our machines and attach it to the correct assets.

Can someone point me in the right direction?  

Thank you so much in advance!



1 Comment   [ + ] Show comment
  • Well, that's better than not having it at all. It put it under software --> Custom Inventory Fields (oh, and I had to do a minor edit to the powershell script because it was putting NULs in the text file, which was really hosing things up)... it would be nice if I could have put it under Inventory Information --> Hardware in some way, but I didn't find a way to do that.
    But as I said, at least I've got the information there in KACE, which is certainly better than walking around to every computer and writing down serial numbers. :D - greg.baughman@800plateau.com 6 years ago

Answers (2)

Answer Summary:
Posted by: Kdebiasse 5 years ago
9th Degree Black Belt
0

How do you place this information into a txt file on the c drive (c:\kbox)

so in kbox folder you see monitor.txt


Posted by: c.castellari 6 years ago
Senior Purple Belt
0

Top Answer

Redirect the output in a text file (ie: c:\windows\temp\monitor.log, or  C:\ProgramData\Quest\KACE\monitor.txt, or wherever you want) then creata a Custom Inventory Rule that reads and import into Kace the text content.

Like this:

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ