Get-PnPAlert

Tip

We encourage you to make improvements to this documentation. Please navigate to https://github.com/pnp/powershell/blob/dev/documentation/Get-PnPAlert.md to change this file.

Returns registered alerts for a user.

Syntax

Get-PnPAlert
   [[-List] <ListPipeBind>]
   [-User <UserPipeBind>]
   [-Title <String>]
   [-AllUsers]
   [-Connection <PnPConnection>]
   [<CommonParameters>]

Examples

EXAMPLE 1

Get-PnPAlert

Returns all registered alerts for the current user.

EXAMPLE 2

Get-PnPAlert -List "Demo List"

Returns all alerts registered on the given list for the current user.

EXAMPLE 3

Get-PnPAlert -List "Demo List" -User "i:0#.f|membership|Alice@contoso.onmicrosoft.com"

Returns all alerts registered on the given list for the specified user.

EXAMPLE 4

Get-PnPAlert -Title "Demo Alert"

Returns all alerts with the given title for the current user. Title comparison is case sensitive.

EXAMPLE 5

Get-PnPAlert -AllUsers

Returns all alerts that exist in the current site, regardless of the user or list it belongs to.

EXAMPLE 6

Get-PnPAlert -List "Demo List" -AllUsers

Returns all alerts that exist in the current site for the list "Demo List", regardless of the user it belongs to.

Parameters

-AllUsers

Retrieves alerts for all users in the current site

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:PnPConnection
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-List

The ID, Title or Url of the list.

Type:ListPipeBind
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Title

Retrieve alerts with this title. Title comparison is case sensitive.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-User

User to retrieve the alerts for (User ID, login name or actual User object). Skip this parameter to retrieve the alerts for the current user. Note: Only site owners can retrieve alerts for other users.

Type:UserPipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False