<< Click to Display Table of Contents >> StartNetworkDiscovery |
Starts a network discovery scan asynchronously and returns the discovery ID. Use GetNetworkDiscoveryStatus to monitor progress and StopNetworkDiscovery to abort a running scan. Only one discovery can run at a time.
WARNING: PDQ Inventory will authenticate to discovered systems using the default or provided credentials. Malicious or rogue machines on the network could potentially capture these credentials. Ensure you trust the network being scanned.
PDQInventory StartNetworkDiscovery -Subnet <subnet> [-Credential <name>] [-Wait]
PDQInventory StartNetworkDiscovery -IPRangeFrom <startIP> -IPRangeTo <endIP> [-Credential <name>] [-Wait]
Parameter |
Required |
Description |
|---|---|---|
-Subnet <subnet> |
Yes* |
Subnet in CIDR notation (e.g., 192.168.1.0/24) or a single IP address. Mutually exclusive with -IPRangeFrom and -IPRangeTo. |
-IPRangeFrom <ip> |
Yes* |
Starting IP address for a range scan (e.g., 192.168.1.1). Must be used with -IPRangeTo. |
-IPRangeTo <ip> |
Yes* |
Ending IP address for a range scan (e.g., 192.168.1.254). Must be used with -IPRangeFrom. |
-Credential <name> |
No |
Name of a stored credential to use when authenticating to discovered systems. If not specified, default credentials are used. See the security warning above. |
-Wait |
No |
Blocks until the discovery completes and displays the final status. Without this flag, the command returns immediately after starting the scan. |
* Either -Subnet or the pair -IPRangeFrom + -IPRangeTo is required, but not both.
Exit Code |
Meaning |
|---|---|
0 |
Discovery started successfully (or completed successfully with -Wait). |
1 |
Discovery failed to start or encountered an error (e.g., one is already running, invalid subnet, credential not found). |
Scan a subnet asynchronously:
PDQInventory StartNetworkDiscovery -Subnet "192.168.1.0/24"
Scan an IP range and wait for completion:
PDQInventory StartNetworkDiscovery -IPRangeFrom 192.168.1.1 -IPRangeTo 192.168.1.254 -Wait
Scan using a named credential (use with caution on untrusted networks):
PDQInventory StartNetworkDiscovery -Subnet "10.0.0.0/16" -Credential "ScanAccount"
Schedule a nightly subnet scan using Windows Task Scheduler (PowerShell):
$action = New-ScheduledTaskAction -Execute "PDQInventory.exe" -Argument 'StartNetworkDiscovery -Subnet "192.168.1.0/24"'
$trigger = New-ScheduledTaskTrigger -Daily -At 2am
Register-ScheduledTask -TaskName "NightlyNetworkDiscovery" -Action $action -Trigger $trigger
© 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