--- title: "Get-NectarEvent" slug: "get-nectarevent" updated: 2023-05-15T17:43:52Z published: 2023-05-15T17:43:52Z canonical: "support.nectarcorp.com/get-nectarevent" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.nectarcorp.com/llms.txt > Use this file to discover all available pages before exploring further. # Get-NectarEvent Return a list of current or historic Nectar monitored device events ## Syntax ``` Get-NectarEvent -TimePeriod -TimePeriodFrom -TimePeriodTo -LastTimeAfter -EventAlertLevels -Locations -SearchQuery -OrderByField -OrderDirection -EventState -TenantName -PageSize -ResultSize ``` ## Examples ### Example 1 ``` Get-NectarEvent -EventAlertLevels CRITICAL,MAJOR ``` Returns a list of current events in the last hour that are either critical or major ### Example 2 ``` Get-NectarEvent -SearchQuery BadServer -EventState Historic -TimePeriod LAST_WEEK ``` Returns a list of historical events from the last week that include the word 'badserver' ## Parameters **-TimePeriod ** The time period to show event data from. Select from 'LAST_HOUR','LAST_DAY','LAST_WEEK','LAST_MONTH','CUSTOM'. CUSTOM requires using TimePeriodFrom and TimePeriodTo parameters. | Parameter | Value | | --- | --- | | Required | false | | Position | 1 | | Required | false | | Default Value | LAST_HOUR | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-TimePeriodFrom ** | Parameter | Value | | --- | --- | | Required | false | | Position | 2 | | Required | false | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-TimePeriodTo ** | Parameter | Value | | --- | --- | | Required | false | | Position | 3 | | Required | false | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-LastTimeAfter ** Only return results that occurred more recently than the entered value. Use date-time format as in 2020-04-20T17:46:37.554 | Parameter | Value | | --- | --- | | Required | false | | Position | 4 | | Required | false | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-EventAlertLevels ** Return only events that meet the specified alert level. Choose one or more from CRITICAL, MAJOR, MINOR, WARNING, GOOD, NO_ACTIVITY | Parameter | Value | | --- | --- | | Required | false | | Position | 5 | | Required | false | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-Locations ** Show alerts for one or more specified locations | Parameter | Value | | --- | --- | | Required | false | | Position | 6 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-SearchQuery ** Search for events that contain the specified string | Parameter | Value | | --- | --- | | Required | false | | Position | 7 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-OrderByField ** Order the resultset by the specified field. Choose from id, type, lastTime, displayName, deviceName, description, eventId, time, delay, source, location, sourceId | Parameter | Value | | --- | --- | | Required | false | | Position | 8 | | Required | false | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-OrderDirection ** | Parameter | Value | | --- | --- | | Required | false | | Position | 9 | | Required | false | | Default Value | None | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-EventState ** Return either current events or previously acknowledged events | Parameter | Value | | --- | --- | | Required | false | | Position | 10 | | Required | false | | Default Value | Current | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-TenantName ** The name of the Nectar DXP tenant. Used in multi-tenant configurations. | Parameter | Value | | --- | --- | | Required | false | | Position | 11 | | Required | false | | Default Value | None | | Accept pipeline input? | true (ByPropertyName) | | Accept wildcard characters? | false | **-PageSize ** The size of the page used to return data. Defaults to 1000 | Parameter | Value | | --- | --- | | Required | false | | Position | 12 | | Required | false | | Default Value | 1000 | | Accept pipeline input? | false | | Accept wildcard characters? | false | **-ResultSize ** The total number of results to return. Defaults to 1000. Maximum result size is 9,999,999 results | Parameter | Value | | --- | --- | | Required | false | | Position | 13 | | Required | false | | Default Value | 0 | | Accept pipeline input? | false | | Accept wildcard characters? | false |