Get-SCSMGroup

Service Managerからグループを取得します。

構文

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

説明

Get-SCSMGroup コマンドレットは、Service Managerからグループを取得します。 このコマンドレットの出力は、 New-SCSMUserRole コマンドレットなどの他のコマンドレットで使用できます。

例 1: Service Managerからグループを取得する

PS C:\>Get-SCSMGroup
Id                                   FullName
--                                   --------
3c8ac4f3-475e-44dd-4163-8a97af363705 Microsoft.SystemCenter.AllComputersGroup
04bca169-5094-4b85-8704-067f333aa830 Microsoft.SystemCenter.CollectionManagementServerComputersGroup
95fe7deb-f466-ca83-aa8d-9845c386cd5a Microsoft.SystemCenter.GatewayManagementServerComputersGroup
099bfe0f-fddb-8d5a-67af-a79317eb6e91 Microsoft.SystemCenter.ManagementServerComputersGroup
0e7983be-95b9-aed8-ff93-8819e4cefcaa Microsoft.SystemCenter.RootManagementServerComputersGroup
3c1ef0a3-b773-11c8-b150-c4e47e5b7d91 Microsoft.SystemCenter.AgentlessManagedComputerGroup
e394c529-dfca-bdb4-5a86-d46078622200 Microsoft.SystemCenter.AgentManagedComputerGroup
e929bd61-1615-ba70-62b2-9fd5eee8aa09 Microsoft.SystemCenter.ManagedComputerClientHealthServiceWatcherGroup
93cb6af4-3e3d-53f6-06a7-04a469197a9c Microsoft.SystemCenter.OpsMgrDBWatchersGroup
a528b843-301e-4e61-6679-104243bbdb6b InstanceGroup_dbbcf4ea8ff241839b6154026698ceb2

このコマンドは、Service Managerからグループを取得します。

例 2: グループを取得し、その詳細をテーブルに表示する

PS C:\>Get-SCSMGroup |Format-Table fullname,displayname
FullName                                                                      DisplayName
--------                                                                      -----------
Microsoft.SystemCenter.AllComputersGroup                                      All Windows Computers
Microsoft.SystemCenter.CollectionManagementServerComputersGroup               Collection Management Server Computer Group
Microsoft.SystemCenter.GatewayManagementServerComputersGroup                  Gateway Management Server Computer Group
Microsoft.SystemCenter.ManagementServerComputersGroup                         Management Server Computer Group
Microsoft.SystemCenter.RootManagementServerComputersGroup                     Root Management Server Computer Group
Microsoft.SystemCenter.AgentlessManagedComputerGroup                          Agentless Managed Computer Group
Microsoft.SystemCenter.AgentManagedComputerGroup                              Agent Managed Computer Group
Microsoft.SystemCenter.ManagedComputerClientHealthServiceWatcherGroup         Managed Computer Client Management Service Watcher Group
Microsoft.SystemCenter.OpsMgrDBWatchersGroup                                  System Center Operations Manager Operational Database Watcher Group
InstanceGroup_dbbcf4ea8ff241839b6154026698ceb2                                mygroup

このコマンドは、グループを取得し、 その FullName プロパティと DisplayName プロパティを表示します

例 3: グループの詳細を取得する

PS C:\>Get-SCSMGroup -DisplayName "All Windows Computers"
Id                                   FullName
--                                   --------
3c8ac4f3-475e-44dd-4163-8a97af363705 Microsoft.SystemCenter.AllComputersGroup

このコマンドは、[すべての Windows コンピューター] グループを取得します。

例 4: グループを取得し、そのプロパティを表示する

PS C:\>Get-SCSMGroup -DisplayName "All Windows Computers"|Format-List
Name                                         :
Path                                         :
DisplayName                                  : All Windows Computers
FullName                                     : Microsoft.SystemCenter.AllComputersGroup
ManagementPackClassIds                       : {3c8ac4f3-475e-44dd-4163-8a97af363705}
LeastDerivedNonAbstractManagementPackClassId : 3c8ac4f3-475e-44dd-4163-8a97af363705
TimeAdded                                    : 12/2/2010 12:19:56 AM
LastModifiedBy                               :
Values                                       : {System.ConfigItem.ObjectStatusEnum.Active, (null), (null), All Windows Computers}
LastModified                                 : 12/2/2010 12:19:56 AM
IsNew                                        : False
HasChanges                                   : False
Id                                           : 3c8ac4f3-475e-44dd-4163-8a97af363705
ManagementGroup                              : psimp2
ManagementGroupId                            : 048d4708-ede4-5aed-1317-81d1b0d0b395

このコマンドは、[すべての Windows コンピューター] グループを取得し、そのすべてのプロパティを表示します。

パラメーター

-ComputerName

接続を確立するコンピューターを指定します。 コンピューターは、System Center データ アクセス サービスを実行している必要があります。 既定値は、現在の管理グループ接続のコンピューターです。

有効な形式は、NetBIOS 名、IP アドレス、または完全修飾ドメイン名 (FQDN) です。 ローカルのコンピューターを指定するには、コンピューター名、「localhost」、またはドット (.) を入力します。

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

-Credential

管理グループ接続の実行に使用するユーザー アカウントを指定します。 サーバーが指定されている場合、アカウントは ComputerName パラメーターで指定されているサーバーにアクセスできる必要があります。 既定値は現在のユーザーです。

Get-Credential コマンドレットによって返される PSCredential オブジェクトを入力できます。

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

-DisplayName

取得するグループの表示名を指定します。

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

-Id

取得するグループの ID を指定します。 これは、GUID または GUID に変換される文字列である場合があります。

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

-SCSession

管理サーバーへの接続を指定します。 既定値は現在の管理グループ接続です。

Get-SCManagementGroupConnection コマンドレットによって返される管理グループ接続オブジェクトを入力できます。

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

入力

System.Guid

グループ GUID を Get-SCSMGroup コマンドレットの Id パラメーターにパイプできます。

System.String

グループの名前を Get-SCSMGroup コマンドレットの DisplayName パラメーターにパイプできます。

出力

Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject

このコマンドレットの出力はグループ オブジェクトです。