Compartir a través de


Get-SCSMView

Retrieves views that are defined in Service Manager.

Syntax

Get-SCSMView
   [[-DisplayName] <String[]>]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMView
   [-Id] <Guid[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCSMView
   [-Name] <String[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

Description

The Get-SCSMView cmdlet retrieves views that are defined in Service Manager.

Examples

Example 1: Display the first three defined views

PS C:\>Get-SCSMView | Select-Object -First 3
Name                                                                          Description
----                                                                          -----------
System.WorkItem.Incident.Queue.Tier2.Unassigned.View                          Lists tier 2 open unassigned incidents
AllSoftwareUpdatesView                                                        Lists all software updates
ChangeManagement.Views.ChangeRequestsCancelled                                Lists all canceled change requests

This command retrieves all of the views. The command uses the Select-Object cmdlet to return only the first three views that are defined in Service Manager.

Example 2: Get the View object

PS C:\>Get-SCSMView -Name "System.WorkItem.Incident.Queue.Tier2.Unassigned.View"
Name                                                                          Description
----                                                                          -----------
System.WorkItem.Incident.Queue.Tier2.Unassigned.View                          Lists tier 2 open unassigned incidents

This command retrieves the View object.

Example 3: Get the management pack for the View

PS C:\>$View = Get-SCSMView -Name "System.WorkItem.Incident.Queue.Tier2.Unassigned.View"
PS C:\> $View.GetManagementPack()
Sealed   Name                                 DisplayName

------   ----                                 -----------

False    ServiceManager.IncidentManagement.Co Service Manager Incident Management

         nfiguration                          Configuration Library

The first command retrieves the View object, and then stores it in the $View variable.

The second command retrieves the management pack in which the View object is defined.

Parameters

-ComputerName

Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.

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

-Credential

Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.

Type:System.Management.Automation.PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

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

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

-Id

Specifies the ID (GUID) of the View object to be retrieved.

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

-Name

Specifies the name of the View object to be retrieved.

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

-SCSession

Specifies an object that represents the session to a Service Manager management server.

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

Inputs

System.String

You can pipe a name to the DisplayName parameter.

System.Guid

You can pipe a GUID to the Id parameter.

Outputs

Microsoft.EnterpriseManagement.Configuration.ManagementPackView

This cmdlet returns view objects.