Gets the details of events generated in a Server Manager event log.
Windows Server · Risk: Low · Documentation Verified
Last verified: 2026-10-26
Microsoft ServerManagerTasks reference: Gets the details of events generated in a Server Manager event log. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Get-SMServerEvent. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / ServerManagerTasks · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-AsJob
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
-BatchSize
Specifies the batch size, or number of event records, that you want returned as results. The default is 100.
-CimSession
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
-EndTime
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.
-Level
Specifies one or more event severity levels that determine which events to return. Valid values include - Informational - Error - Warning - Critical If this parameter is not specified, the default is all events.
-Log
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
-QueryFile
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.
-QueryFileId
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*.
-StartTime
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.
-ThrottleLimit
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Prerequisites
Windows with the ServerManagerTasks module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This is a read-oriented cmdlet; protect any sensitive results and check the documented effects of your selected parameters.
Examples
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. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.