Gets events from the event log.
Syntax
Parameter Set: ServerFilter
Get-WebSitesEvent [[-ComputerName] <String> ] [-EndTime
<DateTime> ] [-PipelineVariable <String> ] [-StartTime
<DateTime> ] [ <CommonParameters>]
The Get-WebSitesEvent gets events from the event log. Specifiy the computer by using the ComputerName parameter and the time range by using the StartTime and EndTime parameters.
Specifies the computer to query.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
Specifies the end time for queries. To get a datetime object, use the Get-Date cmdlet.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
Specifies a variable to be used with the pipeline operator.
Aliases |
pv |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the start time for queries. To get a datetime object, use the Get-Date cmdlet.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
This command gets all events for all times across all of the servers in the farm.
PS C:\> Get-WebSitesEvent
This command gets all events for all times for Server01.
PS C:\> Get-WebSitesEvent -ServerName "Server01"
This command gets all events in the specified timeframe for all of the servers in the farm.
PS C:\> Get-WebSitesEvent -StartTime '7/25/2013 10:57:10 PM' -EndTime '7/25/2013 10:57:12 PM'
This command gets all events for the specified timeframe for Server01.
PS C:\> Get-WebSitesEvent -StartTime '7/25/2013 10:57:10 PM' -EndTime '7/25/2013 10:57:12 PM' -ServerName "Server01"