Get-SMServerEvent

Get-SMServerEvent

Gets the details of events generated in a Server Manager event log.

구문

Parameter Set: GetServerEventDetail5
Get-SMServerEvent [-AsJob] [-BatchSize <UInt32> ] [-CimSession <CimSession[]> ] [-EndTime <UInt64[]> ] [-Level <EventLevelFlag[]> ] [-Log <String[]> ] [-QueryFile <String[]> ] [-QueryFileId <Int32[]> ] [-StartTime <UInt64[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

자세한 설명

The Get-SMServerEvent cmdlet gets the details of events from a server that is running Windows Server 2012 R2, in one of the five Server Manager event log channels.

매개 변수

-AsJob

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-BatchSize<UInt32>

Specifies the batch size, or number of event records, that you want returned as results. The default is 100.

별칭

없음

필수 여부

false

위치

named

기본값

100

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-CimSession<CimSession[]>

이 cmdlet을 실행하도록 설정할 수 있는 최대 동시 작업 수를 지정합니다. 이 매개 변수가 생략되거나 값 0이 입력되면 Windows PowerShell®은 컴퓨터에서 실행 중인 CIM cmdlet의 수에 따라 cmdlet에 대한 최적의 제한 한도를 계산합니다. 제한 한도는 현재 cmdlet에만 적용되며 세션이나 컴퓨터에는 적용되지 않습니다.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-EndTime<UInt64[]>

Specifies one or more event end times. The time value in event records represents the number of seconds that the target server has been online. The command omits events that occur after the EndTime values.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Level<EventLevelFlag[]>

Specifies one or more event severity levels that determines which events to return. Valid values include Informational, Error, Warning, or Critical. If this parameter is not specified, the default is all events.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-Log<String[]>

Specifies one or more Server Manager log channels. For best results, enclose values for this parameter in single quotation marks. The following are valid values for this parameter.

Microsoft-Windows-ServerManager-ConfigureSMRemoting/Operational
Microsoft-Windows-ServerManager-DeploymentProvider/Operational
Microsoft-Windows-ServerManager-MgmtProvider/Operational
Microsoft-Windows-ServerManager-MultiMachine/Admin
Microsoft-Windows-ServerManager-MultiMachine/Operational

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-QueryFile<String[]>

Specifies one or more XML query file names, used for filtering events for a specific role or feature. To filter events for a specific role or group, first run the Get-SMServerFeature function to get the name of the query file that Server Manager uses to get data associated with a specific, installed role or feature. The query file name becomes the value of the QueryFile parameter. Note that Get-SMServerFeature does not return query file names for, nor can you get events for, roles and features that are not installed on the target server.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-QueryFileId<Int32[]>

Specifies one or more query file IDs. You can obtain values for this parameter by running Get-SMServerFeature, as described in the preceding parameter description, QueryFile.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

true (ByPropertyName)

와일드카드 문자 허용 여부

false

-StartTime<UInt64[]>

Specifies one or more event start times. The time value in event records represents the number of seconds that the target server has been online. The command omits events that occur before the StartTime values.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ThrottleLimit<Int32>

이 cmdlet을 실행하도록 설정할 수 있는 최대 동시 작업 수를 지정합니다. 이 매개 변수가 생략되거나 값 0이 입력되면 Windows PowerShell®은 컴퓨터에서 실행 중인 CIM cmdlet의 수에 따라 cmdlet에 대한 최적의 제한 한도를 계산합니다. 제한 한도는 현재 cmdlet에만 적용되며 세션이나 컴퓨터에는 적용되지 않습니다.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

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

입력

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

출력

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

  • Microsoft.Management.Infrastructure.CimInstance#MSFT_ServerEventDetail[]

예제

Example 1: Get Server Manager Management Provider events

This command gets the events in the Server Manager Management Provider Operational event log channel. Because no batch size is specified, the command uses the default batch size, 100 result entries. To reduce the results to a manageable display size, the command is piped to the Format-Table cmdlet, where properties Description and Source become the column headings.

PS C:\> Get-SMServerEvent -Log 'Microsoft-Windows-ServerManager-MgmtProvider/Operational' | Format-Table –Property Description,Source

Example 2: Get events of a specific severity level

This command returns events with a severity level of Warning from the Server Manager Deployment Provider log.

PS C:\> Get-SMServerEvent -Log 'Microsoft-Windows-ServerManager-DeploymentProvider/Operational' –Level Warning

Example 3: Get events for the File and Storage Services role

This command returns events