为 Web 应用程序配置通知设置 (SharePoint Server 2010)

 

适用于: SharePoint Server 2010

上一次修改主题: 2016-11-30

为了帮助用户跟踪对网站的更改,Microsoft SharePoint Server 2010 包括一个警报功能,这是一个电子邮件通知服务。用户可以配置其想要接收或发送的警报以便通知和跟踪对网站上项目的更改。

用户可以针对网站中的以下项创建警报:

  • 列表

    通知用户对列表的更改,例如,当添加、删除或更改列表中的项目时。

  • 列表项

    通知用户对列表中某特定项的更改。

  • 文档库

    通知用户对文档库的更改,例如,当添加、删除或更改文档库中的文档时,或当添加、更改、删除、关闭或启动文档的 Web 讨论时。

  • 文档

    通知用户对特定文档的更改,例如,当更改、添加、删除或关闭文档时。

备注

用户必须至少具有“查看项目”权限才能使用警报。有关如何分配用户对 Web 应用程序的权限的详细信息,请参阅规划网站权限 (SharePoint Server 2010)

可以使用管理中心或 Windows PowerShell 2.0 cmdlets 配置警报。可以打开或关闭警报,还可以指定用户可以创建的警报数量。

在警报可以适用于任何网站之前,必须为服务器启用传出电子邮件。有关如何使用警报和管理消息以及设置传出电子邮件的详细信息,请参阅配置传出电子邮件 (SharePoint Server 2010)

本文内容:

  • 使用管理中心为 Web 应用程序配置警报设置

  • 使用 Windows PowerShell 为 Web 应用程序配置警报设置

使用管理中心为 Web 应用程序配置警报设置

  1. 确认执行此任务的用户帐户是 SharePoint 组“Farm Administrators”的成员。

  2. 在 SharePoint 管理中心网站上,单击“应用程序管理”。

  3. 在“应用程序管理”页上,单击“管理 Web 应用程序”。

  4. 单击您想要为其配置警报的 Web 应用程序。功能区将变为活动的。

  5. 在功能区中,单击“常规设置”下拉菜单,再单击“常规设置”。

  6. 在“Web 应用程序常规设置”页的“警报”部分,配置以下设置:

    • 指定警报是“打开”还是“关闭”。默认情况下,警报为“打开”状态。

    • 在 SharePoint 网站中指定“用户可创建的最多通知数”。该值可以是 1 到 2,000,000,000 之间的任意整数,或者您可以指定警报数量不受限制。警报数量的默认值为 500。

  7. 完成警报配置后,单击“确认”。

使用 Windows PowerShell 为 Web 应用程序配置警报设置

  1. 确认您满足以下最低要求:请参阅 Add-SPShellAdmin

  2. 在“开始”菜单上,单击“所有程序”。

  3. 单击“Microsoft SharePoint 2010 产品”。

  4. 单击“SharePoint 2010 Management Shell”。

  5. 若要使用 Windows PowerShell 2.0 配置警报,首先必须将 Get-SPWebApplication cmdlet 与 Web 应用程序的 URL 一起使用,为 Web 应用程序检索 SPWebApplication 对象。然后,必须为该对象设置合适的警报属性,并使用 SPWebApplication 对象的 Update() 方法保存更改。以下代码示例将执行上述每个步骤。

    在 Windows PowerShell 命令提示符处,键入以下命令:

    $webappurl="<http://ServerName:WebApplicationName>"
    $webapp=Get-SPWebApplication $webappurl 
    # to query the settings you can use the following properties
    # Gets a value that specifies whether alerts are allowed in the Web application.
    $webapp.AlertsEnabled
    
    # Gets a value specifying whether there is a limit to the number of 
    # lists, document libraries, documents and list items for which a user can create alerts.
    $webapp.AlertsLimited
    
    # Gets the maximum number of lists, document libraries, documents and list items 
    # for which a single user can create alerts in a SharePoint web site.
    $webapp.AlertsMaximum
    
    
    # Sets a value that specifies whether alerts are allowed in the Web application.
    # to enable alerts in this Web application 
    $webapp.AlertsEnabled = $true
    $webapp.Update()
    
    # to disable alerts in this Web application 
    $webapp.AlertsEnabled = $false
    $webapp.Update()
    
    
    
    # Sets a value specifying whether there is a limit to the number of 
    # lists, document libraries, documents and list items for which a user can create alerts.
    # to enable limited number of alerts and use of AlertsMaximum setting 
    $webapp.AlertsLimited = $true
    $webapp.Update()
    
    # to enable unlimited number of alerts
    $webapp.AlertsLimited = $false
    $webapp.Update()
    
    # Sets the maximum number of lists, document libraries, documents and list items 
    # for which a single user can create alerts in a SharePoint web site.
    $webapp.AlertsMaximum=<MaxAlertsNumber>
    $webapp.Update()
    

    其中:

    • <http://ServerName:WebApplicationName> 是 Web 应用程序的 URL。

    • <MaxAlertsNumber> 是单个用户可以创建的警报的最大数量。

有关详细信息,请参阅 Get-SPWebApplication