< Back

Start-AutoDiscovery

Sun Jan 19, 2020 5:45 pm

NAME Start-AutoDiscovery



SYNOPSIS

Auto-discovers sensors on a PRTG Device.





SYNTAX

Start-AutoDiscovery [[-TemplateName] <string[]>] -Device <Device> [-PassThru <SwitchParameter>]

[<CommonParameters>]



Start-AutoDiscovery [-Template] <DeviceTemplate[]> -Device <Device> [-PassThru <SwitchParameter>]

[<CommonParameters>]



Start-AutoDiscovery [[-TemplateName] <string[]>] -Id <int> [-PassThru <SwitchParameter>] [<CommonParameters>]



Start-AutoDiscovery [-Template] <DeviceTemplate[]> -Id <int> [-PassThru <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

The Start-AutoDiscovery cmdlet initiates an auto-discovery task against a PRTG Device. When auto-discovery runs,

PRTG will attempt to automatically create sensors under the device based on a series of built-in templates. If a

device is not receptive to a particular sensor type, the sensor is not created.



By default, all device templates known to PRTG will be used for performing the auto-discovery. Templates can be

limited those that match one more specified expressions by specifying the -TemplateName parameter. If one or more

device templates have already been retrieved via a previous call to Get-DeviceTemplate, these can alternatively be

passed to the -Template parameter



Sensors have a built-in flag to indicate whether they were created by auto-discovery. If auto-discovery identifies

a sensor type that is applicable to your device that already has a copy of that sensor that was created manually,

auto-discovery will ignore your existing sensor and create a new one alongside it. Because of this, it is always

recommended to use auto-discovery based sensors to allow for running auto-discovery multiple times without causing

duplicates.



If more than 10 auto-discovery tasks are specified, PRTG will queue the additional tasks to limit the load on the

system.





PARAMETERS

-Device <Device>

The device to perform an auto-discovery upon.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Id <int>

ID of the device to perform an auto-discovery upon.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-DeviceId <int>

ID of the device to perform an auto-discovery upon.



This is an alias of the Id parameter.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-TemplateName <string[]>

One or more expressions used to identify device templates to use for the auto-discovery. If no templates are

specified, only templates enabled on the device will be used.



Required? false

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Template <DeviceTemplate[]>

One or more device templates to use for the auto-discovery. If no templates are specified, only templates

enabled on the device will be used.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PassThru <SwitchParameter>

Specifies whether to return the original IObject that was passed to this cmdlet, allowing the object to be

further piped into additional cmdlets.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

PrtgAPI.Device

The device to perform an auto-discovery upon.





OUTPUTS



---------- EXAMPLE 1 ----------



C:\\> Get-Device | Start-AutoDiscovery



Run auto-discovery against all devices.



---------- EXAMPLE 2 ----------



C:\\> Get-Device dc-1 | Start-AutoDiscovery *wmi*



Run auto-discovery against all devices named "dc-1" using WMI specific device templates



---------- EXAMPLE 3 ----------



C:\\> $templates = Get-DeviceTemplate *wmi*



C:\\> Get-Device dc-1 | Start-AutoDiscovery $templates



Run auto-discovery against all devices named "dc-1" using WMI specific device templates



---------- EXAMPLE 4 ----------



C:\\> Start-AutoDiscovery -Id 1001



Run an auto-discovery against the device with ID 1001.



RELATED LINKS

Online version: https://github.com/lordmilko/PrtgAPI/wi ... iscovery-1

Get-Device

Get-DeviceTemplate