Get-SCDiscovery

Retrieves information about the configured discoveries.

Syntax

Get-SCDiscovery
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCDiscovery
   [-DisplayName] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCDiscovery
   [-Id] <Guid[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCDiscovery
   [-ManagementPack] <ManagementPack[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCDiscovery
   [-Name] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCDiscovery
   [-Target] <ManagementPackClass[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

Description

The Get-SCDiscovery cmdlet in System Center Operations Manager retrieves information about the configured discoveries. This command can also be executed with Get-SCOMDiscovery.

By default, this cmdlet uses the active persistent connection to a management group. Use the SCSession parameter to specify a different persistent connection. You can create a temporary connection to a management group by using the ComputerName and Credential parameters. For more information, type Get-Help about_OpsMgr_Connections.

Examples

1: Obtain all discoveries based on display name

PS C:\>Get-SCDiscovery -DisplayName "Discover Windows Server Computers"

Gets a specific discovery using its display name.

2: Obtain all discoveries located in a management pack

PS C:\>$ManagementPack = Get-SCManagementPack -DisplayName "Operations Manager Internal Library"
Get-SCDiscovery -ManagementPack $ManagementPack

Gets all discoveries within a System Center Operations Manager Management Pack.

3: Obtain discovery details using ID

PS C:\>Get-SCDiscovery -Id 5a055755-71c4-962f-e4b7-b3dc0c4fdf2b

Gets a specific discovery using its ID. For more than one ID, you can separate the items with a comma.

4: Obtain all discoveries associated with a class

PS C:\>Get-SCOMClass -DisplayName 'Linux Computer' | Get-SCDiscovery

Gets all discoveries associated with the Linux Computer class.

5: Obtain all discoveries based on name

PS C:\>Get-SCDiscovery -Name 'Microsoft.SystemCenter.DiscoverWindowsComputerProperties'

Gets all discoveries associated based on name.

Parameters

-ComputerName

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Type:String[]
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:True

-Id

Type:Guid[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ManagementPack

Type:ManagementPack[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Type:String[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-SCSession

Type:Connection[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Target

Type:ManagementPackClass[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False