Set-SPListAudienceTargeting PowerShell Cmdlet


Introduction:

A custom powershell cmdlet which is used to enable the Audience Targeting for the SharePoint 2010 list.

Set-SPListAudienceTargeting

Custom Powershell cmdlet to enable the Audience targeting.

Set-SPListAudienceTargeting [-url] <String> [-ListName] <String> -Enabled <String>

Parameters

Cmdlet1.gif

Detailed Description

The Set-SPListAudienceTargeting cmdlet is used to enable the Audience targeting for the list.

EXAMPLE 1

Set-SPListAudienceTargeting http://sitename/sites/test -ListName "Shared Documents" –Enabled true

This example enables the audience targeting for the list.

Cmdlet2.gif

Register the cmdlet:

  • Unzip the source code.
     
  • Go to the installer folder.
     
  • Run Install.bat.
     
  • anavijai.SP2010.PowerShell.dll will be installed in the gac.
     
  • Go to 14\CONFIG\POWERSHELL\Registration and check whether anavijaiSP2010Cmdlet.xml is available.
     
  • Run "SharePoint 2010 Management Shell" as administrator.
     
  • Check whether the cmdlet is registered by executing the following commands.

    o Get-Command Set-SPListAudienceTargeting
    o Help SPListSettings

Up Next
    Ebook Download
    View all
    Learn
    View all