CSV importing computer name issues

Comments

4 comments

  • Colby Bouma

    Space characters are not valid in Windows hostnames, so the importer was likely designed with that in mind.

    https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/naming-conventions-for-computer-domain-site-ou#computer-names

    However, the CLI seems to accept all of those special characters:

    PDQInventory.exe AddComputers -IgnoreDnsErr -Computers "37f9a058497bge65 AndroidEnterprise 11/3/2021 7:19 PM"

     

    1
    Comment actions Permalink
  • Alan Myers

    Thanks! Didn't even think about importing via CLI. Got it working with the following

    $import = Import-Csv $file.FullName
    $computerlist = $import | select "Device name" -ExpandProperty "Device name"
    PDQInventory.exe AddComputers -IgnoreDnsErr -IgnoreDuplicates -Computers $computerlist

    Is there any way to import data into fields other than just Custom Fields, say something like Serial or OS Name? I see it can be done one device at a time once scanning is disallowed, but that's a whole lot of manual entry.

    Also, I'm seeing that Custom Fields added to the collection window don't populate their values on unscanned devices. Is that a bug maybe?

    1
    Comment actions Permalink
  • Colby Bouma

    Is there any way to import data into fields other than just Custom Fields, say something like Serial or OS Name?

    No, not without interacting with the database directly. If you want to give that a try, I have a PowerShell module named PdqStuff that makes it easier to work with the database. Just be careful, and make sure to back up your database!

    Also, I'm seeing that Custom Fields added to the collection window don't populate their values on unscanned devices.

    I'm not sure what you're talking about. Can you share a screenshot of the issue, please?

    0
    Comment actions Permalink
  • Alan Myers

    If you want to give that a try, I have a PowerShell module named PdqStuff that makes it easier to work with the database.

    That sounds good, I'd like to check that out.

    I'm not sure what you're talking about. Can you share a screenshot of the issue, please?

    Well it's not doing it now, but what it was doing was after adding values to a Custom Field (whether manual entry or importing) the displayed Custom Field column in the main collection window would still be empty. For example, I have a Custom Field called "Notes" which is visible in the main collection window and I was putting notes about retired computers/printers/etc. in there. The devices that had been scanned previously (older Windows devices) would populate immediately, whereas devices that had never been scanned (printers, linux servers, VMware hosts) would not populate at all. Though after the PDQ server rebooted that night all fields were populated the next day. Also, I was connecting from a PDQ console on my workstation to a PDQ central server if that's any help.

    0
    Comment actions Permalink

Please sign in to leave a comment.