Start-Discovery

Start-Discovery

Starts a discovery task for discovering devices or computers.

Syntax

Parameter Set: WindowsDiscoveryConfiguration
Start-Discovery [-ManagementServer] <ManagementServer> [[-WindowsDiscoveryConfiguration] <WindowsDiscoveryConfiguration[]> ] [ <CommonParameters>]

Parameter Set: DeviceDiscoveryConfiguration
Start-Discovery [-ManagementServer] <ManagementServer> [[-DeviceDiscoveryConfiguration] <DeviceDiscoveryConfiguration[]> ] [ <CommonParameters>]

Detailed Description

Starts a discovery task for discovering devices or computers.

Parameters

-DeviceDiscoveryConfiguration<DeviceDiscoveryConfiguration[]>

Specifies an object or objects that describe the devices to discover information about. Use the new-DeviceDiscoveryConfiguration cmdlet to create these objects. To enter more than one value, separate them by using commas.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ManagementServer<ManagementServer>

Specifies the management server that is responsible for the computer or device about which discovery information is to be retrieved.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-WindowsDiscoveryConfiguration<WindowsDiscoveryConfiguration[]>

Specifies an object or objects that describe the computers to discover information about. Use the new-WindowsDiscoveryConfiguration cmdlet to create these objects. To enter more than one value, separate them by using commas.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Notes

  • For more information, type "Get-Help Start-Discovery -detailed". For technical information, type "Get-Help Start-Discovery -full".
    When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".

Examples

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

This command searches for information about a computer named FABRIKAM in the CONTOSO domain. The first command uses new-LdapQueryDiscoveryCriteria to create an object that represents the LDAP query (cn=fabrikam) in the CONTOSO domain. Note that backticks are used to continue lines in the command. You do not have to break your command lines in this way; it was done here because the command did not fit on a single line. If you do use the backtick to input commands over multiple lines, press the enter key twice at the end of the command to exit multiple line entry mode.
The second command makes use of the LDAP query information stored in the $ldap_query variable as a result of the first command. The new-WindowsDiscoveryConfiguration cmdlet is used to create a configuration object that can be used for retrieving information about computers (FABRIKAM in this case).
The third command performs the discovery by using the Start-Discovery cmdlet and providing it with the configuration object built using the previous two commands. The results of the discovery are stored in the $discovery_results variable.
The final command pipelines the discovery results to the select-Object cmdlet, which selects and expands the CustomMonitoringObjects property.

C:\PS>$ldap_query = new-ldapquerydiscoverycriteria `
-domain contoso `
-ldapquery "(cn=fabrikam)"
$windows_discovery_cfg = new-windowsdiscoveryconfiguration `
-ldapquery $ldap_query
$discovery_results = start-discovery `
-managementserver (get-managementserver) `
-windowsdiscoveryconfiguration $windows_discovery_cfg
$discovery_results | select-object -expand custommonitoringobjects

New-DeviceDiscoveryConfiguration

New-LdapQueryDiscoveryCriteria

New-WindowsDiscoveryConfiguration