Get-CimClass

Windows Server 2012 R2 and Windows 8.1

Get-CimClass

Gets a list of CIM classes in a specific namespace.

구문

Parameter Set: ComputerSet
Get-CimClass [[-ClassName] <String> ] [[-Namespace] <String> ] [-ComputerName <String[]> ] [-MethodName <String> ] [-OperationTimeoutSec <UInt32> ] [-PropertyName <String> ] [-QualifierName <String> ] [ <CommonParameters>]

Parameter Set: SessionSet
Get-CimClass [[-ClassName] <String> ] [[-Namespace] <String> ] -CimSession <CimSession[]> [-MethodName <String> ] [-OperationTimeoutSec <UInt32> ] [-PropertyName <String> ] [-QualifierName <String> ] [ <CommonParameters>]




자세한 설명

The Get-CimClass cmdlet retrieves a list of CIM classes in a specific namespace.

If there is no class name supplied, then the cmdlet returns all the classes in the namespace.

Unlike a CIM instance, CIM classes do not contain the CIM session or computer name from which they are retrieved.

매개 변수

-CimSession<CimSession[]>

원격 세션에서 또는 원격 컴퓨터에서 cmdlet을 실행합니다. New-CimSession 또는 Get-CimSession cmdlet의 출력과 같은 컴퓨터 이름이나 세션 개체를 입력합니다. 기본값은 로컬 컴퓨터의 현재 세션입니다.


별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByValue)

와일드카드 문자 허용 여부

false

-ClassName<String>

Specifies the name of the CIM class for which to perform the operation.
NOTE: You can use tab completion to browse the list of classes, because Windows PowerShell gets a list of classes from the local WMI server to provide a list of class names.


별칭

없음

필수 여부

false

위치

1

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-ComputerName<String[]>

Specifies the computer on which you want to run the CIM operation. You can specify a fully qualified domain name (FQDN) a NetBIOS name, or an IP address.

If you specify this parameter, the cmdlet creates a temporary session to the specified computer using the WsMan protocol.

If you do not specify this parameter, the cmdlet performs the operation on the local computer using Component Object Model (COM).

If multiple operations are being performed on the same computer, using a CIM session gives better performance.


별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-MethodName<String>

Finds the classes that have a method matching this name.

You can use wildcard characters with this parameter.


별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-Namespace<String>

Specifies the namespace for CIM operation.

The default namespace is root/cimv2.
NOTE: You can use tab completion to browse the list of namespaces, because Windows PowerShell gets a list of namespaces from the local WMI server to provide the list of namespaces.


별칭

없음

필수 여부

false

위치

2

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-OperationTimeoutSec<UInt32>

Specifies the amount of time that the cmdlet waits for a response from the computer.

By default, the value of this parameter is 0, which means that the cmdlet uses the default timeout value for the server.

If the OperationTimeoutSec parameter is set to a value less than the robust connection retry timeout of 3 minutes, network failures that last more than the value of the OperationTimeoutSec parameter are not recoverable, because the operation on the server times out before the client can reconnect.


별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-PropertyName<String>

Finds the classes which have a property matching this name.

You can use wildcard characters with this parameter.


별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-QualifierName<String>

Filters the classes by class level qualifier name. You can use wildcard characters with this parameter.


별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(http://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • None

    This cmdlet accepts no input objects.


출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • Microsoft.Management.Infrastructure.CimClass

    This cmdlet returns a CIM class object.


예제

Example 1: Get all the class definitions

This command gets all the class definitions under the namespace root/cimv2.


PS C:\> Get-CimClass

Example 2: Get the classes with a specific name

This command gets the classes that contain the word disk in their names.


PS C:\> Get-CimClass -ClassName *disk*

Example 3: Get the classes with a specific method name

This command gets the classes that start with the name Win32 and have a method name that starts with Term.


PS C:\> Get-CimClass –ClassName Win32* -MethodName Term*

Example 4: Get the classes with a specific property name

This command gets the classes that start with the name Win32 and have a property named Handle.


PS C:\> Get-CimClass –ClassName Win32* -PropertyName Handle

Example 5: Get the classes with a specific qualifier name

This command gets the classes that start with the name Win32, contain the word Disk in their names and have the specified qualifier Association.


PS C:\> Get-CimClass –ClassName Win32*Disk* -QualifierName Association

Example 6: Get the class definitions from a specific namespace

This command gets the class definitions that contain the word Net in their names from the specified namespace root/standardCimv2.


PS C:\> Get-CimClass -Namespace root/standardCimv2 -ClassName *Net*

Example 7: Get the class definitions from a remote server

This command gets the class definitions that contain the word disk in their names from the specified remote servers Server01 and Server02.


PS C:\> Get-CimClass -ClassName *disk* -ComputerName Server01, Server02

Example 8: Get the classes by using a CIM session

This set of commands creates a session with multiple computers and stores it into a variable $s using the New-CimSession cmdlet, and then gets the classes using the Get-CimClass cmdlet.


 

PS C:\> $s = New-CimSession -ComputerName Server01, Server02

 

PS C:\> Get-CimClass -ClassName *disk* -CimSession $s

관련 항목

커뮤니티 추가 항목

추가
표시: