PowerShell – Find the manufacturer, model and serial for your monitors

Sometimes I feel the need to do a small inventory.
In this case, the need to do that with monitors found itself to the upper corners of my cranium.
I wanted to get the manufacturer and model. Remembering that many customers also like a serial number in their CMDBs, I put that in there too 🙂
So while waiting for another customer, I wrote this little thing:

Hope you find it useful 🙂

6 comments

  1. Prashant says:

    Hello Jeff,

    I guess there is small typo in the new-object -typenam instead of -TypeName ?

    Regards,
    Prashant

  2. Jeff Wouters says:

    Hi Prashant,
    You’re correct… changed it 🙂 Thanks!
    Jeff

  3. Tim says:

    Hey Jeff,
    Using the “notmatch 0” comparator gives not the correct result as every character with a 0 in it will be skipped (10,20,30,40,…)
    In my case I get this result: ‘DELL U41M’ instead of ‘DELL U2412M’
    (where the number 2 is Decimal 50)
    This also applies to serial number & manufacturer.

    Kind regards,
    Tim

  4. Tim says:

    in addition of my other reply from yesterday.
    I fixed it using -notmatch ‘^0$’
    so only a single 0 will be skipped.

    Kind regards,
    Tim

  5. Jeff Wouters says:

    Hi Tim,
    Thanks for commenting, I’ve updated the code accordingly.
    Jeff.

  6. Thomas says:

    Thanks for sharing Jeff, this was exactly what I was looking for!

Leave a Reply

Your email address will not be published. Required fields are marked *