Automatically Map Custom Field based on other Inventory attribute

Comments

8 comments

  • ah

    Hi Patrick,

    PDQ Inventory does give you the ability to add custom fields, but these are manually entered, and are meant for things that cannot be derived from the machine electronically - and since you definitely can get the manufacturer value, I wouldn't recommend the laborious way of entering this manually for each machine.

    If you need to quickly find all VMs known to PDQ Inventory that have VMWare as manufacturer, you can simply make a dynamic collection that filters on that specific criterion. The collection will automatically update itself based on changes in your AD, when machines are added/removed.

    There's a nice video tutorial here on filters; each video description links to the next part in the series. It's a quick watch.

    https://www.youtube.com/watch?v=IJ3wSpBHLiA&feature=youtu.be 

    Of course, there's also the built-in documentation that you can read through. If you like, I can maybe help you a bit with creating one.

    Once you have a collection, you can then take actions on it (such as deployments, or using it as a criterion in a second filter).

     

    You also have the option of adding the machines to an Active Directory group, and checking for group membership in a filter.

     

    I hope this was helpful, if not, please clarify?

    1
    Comment actions Permalink
  • Patrick Garber

    Hi ah,

    Sorry, I was not clear on what I meant. I mean to use an existing scannable attribute, like Manufacturer, and use that to add a custom field. For example, our VMWare Manufactured servers would all be added to the CustomField Type, and if name contains co1, add to CustomField DataCenter = Colo, if name contains ne7 add to CustomField DataCenter = New England, etc.

    What I mean is the automatic mapping of CustomFields based on other scannable items like manufacturer and name.

    1
    Comment actions Permalink
  • ah

    Hello again Patrick,

    I did catch that much, but I don't understand why you need to do it this way?

    Why check a custom field, when you can simply check manufacturer?

    Is this because you want to list them all in a report with these "enriched" fields, so it is more "human readable"?

    Someone else probably knows more than I do, but I believe the only way you can populate custom fields apart from manual entry is the import wizard, which you already seem familiar with. If what you want to do is "calculate" custom fields based on other metadata in PDQ Inventory, for the primary purpose of presenting these fields in reports/views, I can't see a way to do that. But perhaps others can?

    I would also note that this is a community forum, and as such I wouldn't expect the developers to notice feature requests in here. I'd try submitting it here instead: https://help.pdq.com/hc/en-us/requests/new 

     

    1
    Comment actions Permalink
  • Patrick Garber

    "If what you want to do is "calculate" custom fields based on other metadata in PDQ Inventory, for the primary purpose of presenting these fields in reports/views, I can't see a way to do that. "

    That is exactly what I am trying to do. It is to import into our CMDB with a location field in terms of which datacenter a machine is in. I have not been able to find a way to do it thus far, so it probably does not exist.

    1
    Comment actions Permalink
  • ah

    Okay, in that event, I'd say do these "calculations" in a script instead. You could either define a SQL report directly in PDQ Inventory, where you can probably create all the custom fields you want for your report, or you could run a PowerShell script outside of PDQ Inventory against your AD, and calculate the custom fields there - output it all into a CSV that you then import into PDQ Inventory using the wizard.

    But I freely admit that while I've been using PDQ Deploy for about 2 years,I haven't been using PDQ Inventory for more than 4 months or so.

    I'd say open a ticket via the link I gave you to make sure, unless the SQL/PowerShell solutions satisfy your needs. :-)

    Sorry I couldn't be of more help.

    1
    Comment actions Permalink
  • Patrick Garber

    Thanks. The Powershell/SQL method will probably work for my needs. Thank you!

    1
    Comment actions Permalink
  • ah

    Hi Patrick,

    great, I hope it works out! And I forgot to say, I'd love to see your solution if you get it working, so please post it here if and when you can.

    Likely others can benefit too, myself included. :-)

    1
    Comment actions Permalink
  • ah

    Hey Patrick,

    looks like most of the work has been done for you - this should be close to what you need:

    https://www.pdq.com/blog/adding-custom-fields-multiple-computers-powershell/ 

    I got this from raising a support ticket. It pays. :-)

    1
    Comment actions Permalink

Please sign in to leave a comment.