Get-SCSMView
擷取 Service Manager 中定義的檢視。
語法
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
Get-SCSMView Cmdlet 會擷取 Service Manager 中定義的檢視。
範例
範例 1:顯示前三個定義的檢視
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
此命令會擷取所有檢視。 此命令會使用 Select-Object Cmdlet 只傳回 Service Manager 中定義的前三個檢視。
範例 2:取得 View 物件
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
此命令會擷取 View 物件。
範例 3:取得檢視的管理元件
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
第一個命令會擷取 View 對象,然後將它儲存在$View變數中。
第二個命令會擷取定義 View 物件的管理元件。
參數
-ComputerName
指定 System Center 資料存取服務執行所在的電腦名稱。 Credential 參數中指定的使用者帳戶必須具有指定計算機的訪問許可權。
類型: | System.String[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Credential
指定此 Cmdlet 用來連線到 System Center 資料存取服務執行所在的伺服器認證。 指定的使用者帳戶必須具有該伺服器的訪問許可權。
類型: | System.Management.Automation.PSCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DisplayName
指定要擷取 View 物件的顯示名稱。
類型: | System.String[] |
Position: | 0 |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-Id
指定要擷取 View 物件的識別碼 (GUID)。
類型: | System.Guid[] |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Name
指定要擷取 View 物件的名稱。
類型: | System.String[] |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-SCSession
指定物件,表示 Service Manager 管理伺服器的會話。
類型: | Microsoft.SystemCenter.Core.Connection.Connection[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
System.String
您可以使用管線將名稱傳送至 DisplayName 參數。
System.Guid
您可以使用管線將 GUID 傳送至 Id 參數。
輸出
Microsoft.EnterpriseManagement.Configuration.ManagementPackView
此 Cmdlet 會傳回檢視物件。