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[]>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

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>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • 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