Get-SCSMDiscovery

Get-SCSMDiscovery

Gets discovery information from Service Manager.

Syntax

Parameter Set: Empty
Get-SCSMDiscovery [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromDiscoveryDisplayName
Get-SCSMDiscovery [-DisplayName] <String[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromDiscoveryId
Get-SCSMDiscovery [-Id] <Guid[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromDiscoveryName
Get-SCSMDiscovery [-Name] <String[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromManagementPack
Get-SCSMDiscovery [-ManagementPack] <ManagementPack[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromManagementPackClass
Get-SCSMDiscovery [-Target] <ManagementPackClass[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Detailed Description

The Get-SCSMDiscovery cmdlet retrieves discovery information from Service Manager.

Parameters

-ComputerName<String[]>

Specifies a computer with which to establish a connection. The computer must be running the System Center Data Access service. The default value is the computer for the current management group connection.

Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, type the computer name, "localhost," or a dot (.).

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a user account under which the management group connection runs. The account must have access to the server that is specified in the ComputerName parameter, if the server is specified. The default value is the current user.

You can enter a PSCredential object that is returned by the Get-Credential cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

Current user context

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-DisplayName<String[]>

Specifies the display name of the discovery object to be retrieved.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

true

-Id<Guid[]>

Specifies the ID of the discovery object to be retrieved. This may be a GUID or a string that will be converted to a GUID.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ManagementPack<ManagementPack[]>

Specifies one or more management packs containing the discovery objects to retrieve.

You can enter a ManagementPack object that is returned by the Get-SCManagementPack cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Name<String[]>

Specifies the name of a discovery object to retrieve.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

true

-SCSession<Connection[]>

Specifies a connection to a management server. The default value is the current management group connection.

You can enter a management group connection object that is returned by the Get-SCManagementGroupConnection cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Target<ManagementPackClass[]>

Specifies the management pack that contains the classes that are targeted by the discovery.

Aliases

none

Required?

true

Position?

1

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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.EnterpriseManagement.Configuration.ManagementPack

    You can pipe a management pack object to the ManagementPack parameter of the Get-SCSMDiscovery cmdlet.

  • System.String

    You can pipe a discovery name to the Name parameter of the Get-SCSMDiscovery cmdlet.

  • System.Guid

    You can pipe a GUID of a discovery object to the Id parameter of the Get-SCSMDiscovery cmdlet.

  • Microsoft.EnterpriseManagement.Configuration.ManagementPackClass

    You can pipe a management pack to the Target parameter of the Get-SCSMDiscovery cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.EnterpriseManagement.Configuration.ManagementPackDiscovery

    This cmdlets generates a discovery object.

Examples

Example 1: Get Service Manager discoveries

This command retrieves the discoveries that are defined in Service Manager.

PS C:\>Get-SCSMDiscovery

Example 2: Get discoveries by name

This command retrieves the discoveries where the name matchs the expression *PopulateRootM*.

PS C:\>Get-SCSMDiscovery -Name "*PopulateRootM*"

Example 3: Get discoveries by name and display them in a list

This command retrieves the discoveries in which the name matches *PopulateRootM* and then displays the results formatted as a list.

PS C:\>Get-SCSMDiscovery -Name "*PopulateRootM*" | Format-List