GetNetworkDiscoveryStatus

<< Click to Display Table of Contents >>

GetNetworkDiscoveryStatus

Returns status information for network discoveries. You can query by ID, list all currently running scans, or review recent discoveries. Supports multiple output formats for scripting.

Syntax

PDQInventory GetNetworkDiscoveryStatus -Id <id> [-Json | -Csv | -Brief]

PDQInventory GetNetworkDiscoveryStatus -Running [-Json | -Csv | -Brief]

PDQInventory GetNetworkDiscoveryStatus -Recent <count> [-Json | -Csv | -Brief]

Parameters

Parameter

Required

Description

-Id <id>

Yes*

The numeric discovery ID returned by StartNetworkDiscovery.

-Running

Yes*

Lists all discoveries that are currently queued, running, or paused.

-Recent <count>

Yes*

Lists the most recent discoveries. Specify the number to return (e.g., -Recent 10 for the last 10).

-Json

No

Outputs results in JSON format for use with tools like ConvertFrom-Json in PowerShell.

-Csv

No

Outputs results in CSV format with a header row.

-Brief

No

Outputs one line per discovery showing only the ID and status, separated by a tab.

* One of -Id, -Running, or -Recent is required.

Exit Codes

Exit Code

Meaning

0

Status retrieved successfully. When using -Id, indicates the discovery has finished or was aborted.

2

The discovery queried by -Id is still running or queued. Useful for polling in scripts.

3

The specified discovery ID was not found.

Examples

Check the status of a specific discovery:

PDQInventory GetNetworkDiscoveryStatus -Id 42

List all currently running or queued discoveries:

PDQInventory GetNetworkDiscoveryStatus -Running

Show the 5 most recent discoveries in JSON format:

PDQInventory GetNetworkDiscoveryStatus -Recent 5 -Json

Poll until a discovery completes (PowerShell):

do { Start-Sleep 5 } while ((PDQInventory GetNetworkDiscoveryStatus -Id $id; $LASTEXITCODE) -eq 2)

 

 

 

© 2026 PDQ.com Corporation. All rights reserved.

PDQ.com is a trademark of PDQ.com Corporation. All other product and company names are the property of their respective owners.

Help Version: 20.0.22.0