Is it possible to export list of devices in csv or similar

well a very short example is this:

        # define the url/adress of your librenms server ( leave /api/v0/ intact)
        $baseurl = "http://librenms.lol/api/v0/"

        #fill in api token which you can retrieve from  web interface
        $token = "your api token"

    # generating header(do not touch)
        $header = @{
        "X-Auth-Token" = $token}

    #defining url to get devices
        $gdevices = $baseurl + "devices?type=network"

    #invoking api request and showing results in grid view
        Invoke-RestMethod -uri $gdevices -Headers $header |select  -ExpandProperty devices -ExcludeProperty sysDescr |ogv

As Aauvinet found out below: the invoke-restmethod command is not available in powershell 2 or below. please installl windows Management framework 5 (which includes a newer version of powershell) or above to work around this .

2 Likes