What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Alle Seriennummern von Geräten Exportiern

Votes:

0

Ist es möglich, mit der PrtgAPI eine Liste zu bekommen, mit allen Seriennummern mit den dazugehörigen Geräten?

Bis jetzt habe ich den folgenden Befehl: /api/table.csv?id=40&content=sysinfo&category=system&columns=_displayname,_value

Allerdings möchte ich die Seriennummer von allen Geräten und nicht nur von einem.

api device prtg-api serial-number

Created on Oct 2, 2018 12:15:06 PM



1 Reply

Accepted Answer

Votes:

0

You can easily retrieve the serial numbers of all devices with PrtgAPI

C:\> Get-Device | Get-SystemInfo system | where name -like "*serial*"

Name                           DeviceId   Property             Id     Value
----                           --------   --------             --     -----
Bios Serial Number             8701       Bios Serial Number          ABC123
Bios Serial Number             9458       Bios Serial Number          XYZ456
Bios Serial Number             9508       Bios Serial Number          EFG789
...

However, I strongly recommend you don't do this, as PRTG provides no guarantee that devices will contain this information. In practice, you will likely find that many of your devices are missing many of their system information types. If PRTG does not have this information for a specified device, `Get-SystemInfo` will simply return nothing.

If you are auditing Windows devices and have access to the domain, I strongly recommend you instead consider using WMI to audit serial numbers. If you wish to limit this to just the devices in PRTG, you can just the Get-Device (optionally specifying some type of filter) instead of doing Get-ADComputer on the Domain Controller

$devices = Get-Device
$results = @()

foreach($device in $devices)
{
    $serial = (gwmi win32_bios -computername $device.Host).SerialNumber
    $obj = [PSCustomObject]@{
        Name=$device.Name
        Host=$device.Host
        Serial=$serial
    }

    $results += $obj
}

$results

If you don't speak English, hopefully this post turns out well in Google Translate!

Regards,

lordmilko

Created on Oct 3, 2018 5:41:27 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.