Get-SCDiscovery
检索有关配置的发现的信息。
语法
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>]
说明
System Center Operations Manager 中的 Get-SCDiscovery cmdlet 检索有关已配置发现的信息。 也可以使用 执行 Get-SCOMDiscovery
此命令。
默认情况下,此 cmdlet 使用与管理组的活动持久连接。 使用 SCSession 参数指定不同的持久连接。 可以使用 ComputerName 和 Credential 参数创建与管理组的临时连接。 要了解详情,请键入 Get-Help about_OpsMgr_Connections
。
示例
1:根据显示名称获取所有发现
PS C:\>Get-SCDiscovery -DisplayName "Discover Windows Server Computers"
使用其显示名称获取特定发现。
2:获取位于管理包中的所有发现
PS C:\>$ManagementPack = Get-SCManagementPack -DisplayName "Operations Manager Internal Library"
Get-SCDiscovery -ManagementPack $ManagementPack
获取 System Center Operations Manager 管理包中的所有发现。
3:使用 ID 获取发现详细信息
PS C:\>Get-SCDiscovery -Id 5a055755-71c4-962f-e4b7-b3dc0c4fdf2b
使用其 ID 获取特定发现。 对于多个 ID,可以使用逗号分隔这些项。
4:获取与类关联的所有发现
PS C:\>Get-SCOMClass -DisplayName 'Linux Computer' | Get-SCDiscovery
获取与 Linux 计算机类关联的所有发现。
5:根据名称获取所有发现
PS C:\>Get-SCDiscovery -Name 'Microsoft.SystemCenter.DiscoverWindowsComputerProperties'
获取基于名称关联的所有发现。
参数
-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 |