Tuesday, 6 December 2011

Navigation Key Filters and Hierarchies

SharePoint 2010 Navigation Hierarchies and Key Filters

Navigation Hierarchies
Navigation Hierarchies appear in the left hand pane of the new user interface and allow users to navigate metadata taxonomy in order to filter the view of lists / document libraries etc. For example, I've setup a document library that contains documents with different security classifications.  To do this I've added a column called Classification that has possible values of PUBLIC, CONFIDENTIAL and INTERNAL. Here is the document library:


Navigation4


I can turn on the navigation hierarchy for this library by going into the Document Library settings, selecting Metadata Navigation Settings, and then adding the Classification column to the list of Selected Hierarchy Fields.

Navigation

Once this Setting is in place we can go back to our document linrary and we will see Classification as a available field in the Hierarchy:
Navigation2

By clicking on the CONFIDENTIAL value in the hierarchy, I will see only the CONFIDENTIAL documents in my library.

Navigation3

Maybe not that impressive in a document library that only has 15 documents, but in a library that may contain a few hundred documents this would really help users filter down to specific documents they want to find and work with.


Key Filters

Key Filters also appear in the left hand pane of the user interface just below the navigation hierarchy. Key Filters operate in a similar fashion to the navigation hierarchy.  They are also used to filter a list or document library.  The difference is that the user does not have to navigate a hierarchy, they can simply type in the value they wish to filter on, or in some cases select the value from a drop down list.  When the user clicks Apply, their list or library will be filtered based on the value.

Navigation5

In order to configure the Key Filters option, the administrator goes into the Document Settings, Metadata Navigation Settings, and then adds the Classification column to the Selected Key Filters Fields.

Navigation6

These features should help your users get more value out of the metadata.  If you are interested in using metadata for SharePoint security see the Metadata Security blog.

Thursday, 1 December 2011

Removing Unused Service Application App Pools Using Power Shell

1.  Log into your Central Administration server

2.  Bring up SharePoint 2010 Management Shell (PowerShell) using Admin rights

3.  To list all SharePoint 2010 Service Application App Pools run this PowerShell cmdlt

Get-SPServiceApplicationPool

4.  To remove the Service Application App Pools simply run this PowerShell cmdlt
Remove-SPServiceApplicationPool “[Name of Service Application App Pool]“

5.  You will be promoted to confirm:
Are you sure you want to perform this action?
Performing operation “Remove-SPServiceApplicationPool” on Target “Name of Service Application Pool”
[Y] Yes [A]Yes to All [N] No [L] No to All [S] Suspend [?] Help
<default is “Y”>:


6.  After selecting Y for Yes, you can now double check to make sure the Service Application App Pool was indeed removed by re-running the Get-SPServiceApplicationPool cmdlt

7.  You should no longer see the Service Application App Pool.

8.  Now you can go back to Central Administration and attempt to create the Service Application App Pool using the same name used previously.

Monday, 21 November 2011

Developer DashBoard Enable and Disable

Developer Dashboard is one of the hidden gems available on SharePoint 2010. Often overlooked by administrators, this neat feature, disabled by default, provides performance and tracing information that can be put into good use to debug and troubleshoot page rendering time issues. Pages loading slow or webparts behaving badly? Is it the server resources or the database queries are taking too long?
Enabling this great feature will help you get critical information about execution time, log correlation ID, critical events, database queries, service calls, SPRequests allocation and webpart events offsets.
As I mentioned above, the developer dashboard is turned off by default, but it can be enabled very easy via stsadm or PowerShell.

Enable Developer Dashboard via stsadm:
‘On’ Mode: stsadm -o setproperty -pn developer-dashboard -pv on
‘OnDemand’ Mode: stsadm -o setproperty -pn developer-dashboard -pv ondemand
Disable Developer Dashboard via stsadm:stsadm -o setproperty -pn developer-dashboard -pv off
Enable Developer Dashboard via PowerShell (SharePoint 2010 Management Shell):
SharePoint 2010 Management Shell

‘OnDemand’ Mode:
$sp2010 = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$sp2010.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand;
$sp2010.RequiredPermissions = 'EmptyMask';
$sp2010.TraceEnabled = $true;
$sp2010.Update();
‘On’ Mode:
$sp2010 = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$sp2010.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On;
$sp2010.RequiredPermissions = 'EmptyMask';
$sp2010.TraceEnabled = $true;
$sp2010.Update();
Disable Developer Dashboard – ‘Off’ Mode:
$sp2010 = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$sp2010.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off;
$sp2010.Update();
If you enabled the Developer Dashboard using the OnDemand mode you should see on the left hand side of the ribbon a small icon next to the login credentials.Developer Dashboard Icon If you chose to go with the On mode you will not see the small icon but the Developer Dashboard will be available on the bottom of all your page. To disable the Developer Dashboard just use one of the Off modes on stsadm or PowerShell.
Developer Dashboard

Tuesday, 1 November 2011

If Outlook Inbox full

Create a .pst file while Outlook is running
To create a .pst file while Outlook is running, follow these steps:
1.        On the File menu, point to New, and then click Outlook Data File.
2.        In the Types of storage area, click Office Outlook Personal Folders File (.pst) to create a new Outlook 2003 .pst file. Click Outlook 97-2002 Personal Folders File (.pst) to create a new Outlook .pst file that is compatible with earlier versions of Outlook.
3.        Click OK.
4.        Use the default Outlook folder location, or you can locate a different folder location.
5.        In the File name box, type a name for the new .pst file, or you can use the default name. Click OK.
6.        In the Name box, type a title for the .pst file, or you can use the default title of Personal Folders. The title that you enter in the Name box is the name that is used on the Outlook 2003 All Mail Folders list, and it is applied to any shortcuts that are made for the .pst file on the Outlook Bar. You can also select an encryption setting and a password for the .pst file. After you select the settings that you want, click OK.

Note You cannot change the encryption setting after you create the .pst file. For more information about the encryption settings, see the "Security settings for .pst files" section in this article.
7.        The new .pst file is added to the Outlook 2003 All Mail Folders list. To view the Folder List, click Folder List on the Go menu.

Tuesday, 25 October 2011

Apply Custom Masterpage to all subsites

How to apply custom master page and theme to all sub sites in SharePoint 2010?


1. Go to Site Actions | Site Settings
2. Click on Manage Site Features
manage_site_features
3. Activate SharePoint Server Publishing
activate_sharepoint_2010_server_publishing
4. Go to Site Actions | Site Settings again and under Look and Feel click on Master Page
master_pages 
5. In Site Master Page click on the drop down and select your custom master page. If your not sure how to create custom master page, please see : http://virtualizesharepoint.com/category/sharepoint-2010-branding/
Selecting Custom Master Pages in SharePoint 2010
6.  Put a check in Reset all subsites to inherit this site master page setting and click OK in the bottom of the page
reset_all_subsites_to_inherite_this_master_page_settings_sharepoint_2010



This will apply custom master page to all sub sites in SharePoint

Monday, 24 October 2011

Adding an extra server to an existing farm

Here’s how that can be done:
  1. Install Windows Server 2003 R2
  2. Install IIS 6.0 
  3. Install .Net 2.0 and .Net 3.0
  4. Fully patch the server with the respective service packs and security updates
  5. In Internet Information Services Manager remeber to allow ASP.Net in the Web Service Extensions section. 
  6. Join the server to the domain where the rest of the farm belong to, if you haven’t already done so
  7. Add the MOSS installation account to the local administrators group.
Install MOSS and join the server to the existing farm
  1. Install using the MOSS installation account
  2. Start MOSS Setup, enter your license key and accept the license agreement
  3. Select Advanced and Complete install
  4. Run the SharePoint Product and Technologies Configuration Wizard
  5. Connect to an existing farm
  6. Enter the MOSS database server end click Retrieve Database Names. The Database Name and Username fields are automatically populated. Enter the password and click Next
  7. In Advanced Setting make sure that this server will not host the Central Administration site and click Next
  8.  That’s it. The new server is now member of the farm. Use Central Administration to configure it for the purpose it is intended (Web Front-end, indexing etc)

Wednesday, 12 October 2011

How to Restrict the users to create Mysite

How To disable Mysite Creation :




Open Central admin and click on Application Management | Manage Service Applications

Once there click on User Profile Service Application

You now need to click on manage user permissions under the People section

Once you click manage user permissions you will be presented with a windows as illustrated below

By default Authenticated users and All Authenticated users are in and enabled to create my sites out of the box. I will remove all permissions and now the user will see no my site link

The easiest way to manage a large amount of users is to create a security group in Active Directory I will call my My Site Users and drop the users in as you require them to use My Site.

I will now add my new security group into the permissions section to allow the creation of my site

But I will only allow Create Personal Site and then go through what the other tick boxes allow.

Wednesday, 21 September 2011

Create My Site

To create a My Site host site collection

  1. Verify that you have the following administrative credentials:
    • To create a My Site host site collection, you must be a member of the Farm Administrators group on the computer running the SharePoint Central Administration Web site or a service application administrator for the services related to My Sites. If you are a service application administrator, you must also have permission to create site collections in the Web application that you dedicate to host My Sites.
  2. In SharePoint Central Administration, click Application Management and then click Create site collections. The Create Site Collection page opens.
  3. In Web Application, ensure that the selected Web application is the Web application that you want to host My Sites. If it is not, expand the list and then click Change Web Application. The Select Web Application dialog box opens and you can select a different Web application.
  4. In Title and Description, type a title and description for the site collection.
  5. In Web Site Address, select the URL where you want this site collection created. Generally, you should use the default path (which displays as / in the user interface), which is the root of the Web application. For more information about this path, see My Sites architecture in the "Plan for My Sites" article.
  6. In Template Selection, select the Enterprise tab and then click My Site Host.
  7. In Primary Site Collection Administrator, and optionally in Secondary Site Collection Administrator, type an account in the format domain\user_name to specify an administrator for the site collection.
  8. Optionally, in Quota Template, select a quota template for the My Site host site collection. This quota template does not affect the individual site collections that users create for their My Sites. For more information, see Planning for storage requirements in the "Plan for My Sites" article.
  9. Copy this site collection URL for later reference.

Sunday, 4 September 2011

Steps to Create Host Header

1.          start -> Admin Tools -> DNS -> Forward lookup zones -> (Domain Name)Moss.com ->
             Right click on it -> New Host -> Enter Host Name & Ip address (Run -> cmd -> ipconfig) ->
             click OK.(host display will created)

2.         Again Right click on Moss.com -> New Alias(Cname) -> Enter same name with c
            (Ex - ckrp or krp1) -> Browse -> Moss -> forward lookup -> Moss.com -> Click on file -> ok.

3.          Open Host file(c:windows -> system32 -> Drivers -> etc -> hosts (Open with wordpad)
              (Ip address and Name Ex: 192.168.0.1 krp)then save and close.

4.          Open central admin -> Create new website or extended -> create webapplication ->
             fill the details -> in that Host name should be like (Ex:Krp) and kept default prot no is 80.
5.         Create site.
6.         Open IIS -> select our site -> Right click -> Properties -> Assign ip address here and Click on Ok.

7.        Again Right click on site and click on browse.

Thursday, 1 September 2011

How to change the URL of the sharepoint

  1. On the Alternate Access Mappings page, click Edit Public URLs.
  2. If the mapping collection that you want to modify is not specified, then choose one.
    In the Alternate Access Mapping Collection section,
    click Change alternate access mapping collection on the Alternate Access Mapping Collection menu.
  3. On the Select an Alternate Access Mapping Collection page, click a mapping collection.
  4. In the Public URLs section, you may add new URLs or edit existing URLs in any of the following text boxes: Default, Intranet, or you can change the Default from  http://abc:555 to http://abctest
  5. Click Save.
Now you’ll have to switch over to your DNS server.
  1. Within the DNS Management Console and Under Forward Lookup Zones:
    Add a new Primary Zone with your new domain name.
    Add a new Host (A) to the records for http://abctest and point the IP Address to the sharepoint server

Configure User Profile synchronization to sharepoint2010

Step 1 – Prerequisites


Account needed for Syncing

We need an account set up for the AD profile synchronization. Let’s call it “Service-spADsync“, we need to configure a couple of things on this account in AD:
  1. Add “Replicate Directory Changes” permission
    1. On the domain controller, click Start, click Administrative Tools, and then click Active Directory Users and Computers.
    2. In Active Directory Users and Computers, right-click the domain, and then click Delegate Control.
    3. On the first page of the Delegation of Control Wizard, click Next.
    4. In the Users or Groups page, click Add.
    5. Type the name of the synchronization account, and then click OK.
    6. Click Next.
    7. In the Tasks to Delegate page, select Create a custom task to delegate, and then click Next.
    8. On the Active Directory Object Type page, select This folder, existing objects in this folder, and creation of new objects in this folder, and then click Next.
    9. On the Permissions page, in the Permissions box, select Replicate Directory Changes, and then click Next.
    10. Click Finish.
  2. Add account to “Pre-Windows 2000 Compatible Access” group
    1. On the domain controller, click Start, click Administrative Tools, and then click Active Directory Users and Computers.
    2. In Active Directory Users and Computers, expand the domain, expand Builtin, right-click Pre-Windows 2000 Compatible Access, and then click Properties.
    3. In the Properties dialog box, select the Members tab, and then click Add.
    4. Type the name of the synchronization account, and then click OK.
    5. Click OK.
  3. Grant Replicate Directory Changes permission on the cn=configuration container
    1. On the domain controller, click Start, click Run, type adsiedit.msc, and then click OK.
    2. In ADSI Edit, if the Configuration node is not already present, select ADSI Edit, on the Action menu click Connect to, in the Connection Point area of the Connection Settings dialog box select Select a well known Naming Context, select Configuration from the drop-down list, and then click OK.
    3. Expand the Configuration node, right-click the CN=Configuration… node, and then click Properties.
    4. In the Properties dialog box, select the Security tab.
    5. In the Group or user names section, click Add.
    6. Type the name of the synchronization account, and then click OK.
    7. In the Group or user names section, select the synchronization account.
    8. In the Permissions section, select Replicating Directory Changes (select Replicate Directory Changes on Windows Server 2003), and then click OK.

Forefront Services

On the box that will be running the “User Profile Synchronization Service”
Go to Start > Administrative Tools > Services
Set both “Forefront Identity Manager Service” and “Forefront Identity Manager Synchronization Service” to run under your farm account and set them to automatically start and start both services

Step 2 – Delete any current User Profile Service Application (Optional)

I like to delete the current “User Profile Service Application” that gets created if you use the wizard to create your farm, I will be creating my own in the next step.
Under Central Administration > Application Management > Manage Service Applications
Select “User Profile Service Application” and then select Delete from the ribbon bar
Select “Delete data associated with the Service Application”
Press “OK”
Press “OK”

Step 3 – Create New User Profile Service Application

Under Central Administration > Application Management > Manage Service Applications
Select “User Profile Service Application” under the “New” button on the ribbon bar
If you do not have “User Profile Service” installed then you will have more options than the couple of options listed below. Just fill out all the appropriate information to create the application. Other options that will appear are things like creating the Profile DB and other options related to My Sites.
Name: AD Sync – User Profile Service Application
Create a new application pool called WSS_ADSYNC
Select the account to use for the application pool; I use my farm account which also runs all other service applications
Press “Create”
Press “OK”

Step 4 – Configure the Service

Under Central Administration > System Settings > Manage services on server
Press “Start” next to “User Profile Synchronization Service”
Select the “AD Sync – User Profile Service Application” that you just created
Enter the password for the service account you are using
Press “OK”
The service will be stuck at starting for several minutes; this process can take up to 20 minutes. Refresh the page to determine if the service has started yet. If the service does not start check the services on the local computer “Forefront Identity Manager Synchronization Service” and make sure it is not disabled.
After the “User Profile Synchronization Service” shows as being started, run an IISRESET on the server that is running the “User Profile Synchronization Service”
Start > Run > CMD (Make sure you see “Administrator:” in the title bar or you might get an access denied when trying to perform an IISRESET.
Type in “IISRESET”

Step 5 – Configure connections and import data from Active Directory

Under Central Administration > Application Management > Manage Service Applications
Select “AD Sync User Profile Service Application” and then select Manage from the ribbon bar or you can just click the name “AD Sync User Profile Service Application”
Click “Configure Synchronization Connections”
Click “Create New Connection”
I named the connection “AD Sync Connection”
The type is “Active Directory”
The Forest name is “PINTOLAKE”
The Authentication Provider Type is “Windows Authentication”
Enter the Service Account we created in Step 1 and the password
The port for AD is “389″
Select “Populate Containers”, this will popular your AD information in the window below
Select the containers you want to sync or press “select all”, for this particular install we are going to select all
Press “OK”
SharePoint will process your request
You should now see your connection listed. If you get an error try again, sometimes it times out while trying to make the connection to AD. Just try to configure a new connection again.

Step 6 -Synchronization Options (Optional)

There are a couple options you can go through before you start synchronization
  1. Define connection filters – this is if you want to filter information from the AD sync
Under Central Administration > Application Management > Manage Service Applications
Select “AD Sync User Profile Service Application” and then select Manage from the ribbon bar or you can just click the name “AD Sync User Profile Service Application”
Click “Configure Synchronization Connections” then pull the drop down menu on your connection then select “Edit Connection Filters”
  1. Map User Profile Properties – this option already has a bunch of preconfigured fields but you might need to change some of them or reconfigure existing ones
Under Central Administration > Application Management > Manage Service Applications
Select “AD Sync User Profile Service Application” and then select Manage from the ribbon bar or you can just click the name “AD Sync User Profile Service Application”
Click “Manage User Properties” under the “People” section

Step 7 -Start Profile Synchronization

Under Central Administration > Application Management > Manage Service Applications
Select “AD Sync User Profile Service Application” and then select Manage from the ribbon bar or you can just click the name “AD Sync User Profile Service Application”
Under “Synchronization” select “Start Profile Synchronization”
Select “Start full Synchronization”
Press “OK”
You should now see that the “Profile Synchronization Status” has changed to “Synchronizing” and the “Current Synchronization Stage” has changed to “Active Directory Import (xxx)”. Watch this for a while and make sure the (xxx) increases in value; this is the number of objects being imported from AD.
Start of Sync
During Syncing
By default the job will run every day at 1:00 AM, you can change this from:
Select “AD Sync User Profile Service Application” and then select Manage from the ribbon bar or you can just click the name “AD Sync User Profile Service Application”
Under “Synchronization” select “Configure Synchronization Timer Job”


Note : check to which domain SharePoint is connected(Run -> CMD -> SET L ) after that check domain controller service is working fine.(In Domain Controller server -> Run -> CMD -> dcconfig)

Thursday, 25 August 2011

Can upload Multiple Max Mb files and unable to upload single files

upload using single upload failed, multiple upload works  :

Increase the maximum upload  size

1. Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.

2. Under Virtual Server Configuration, click Configure virtual server settings.

3. On the Virtual Server List page, click the virtual server you want to change.

4. On the Virtual Server Settings page, under Virtual Server Management, click Virtual server general settings.

5. Under maximum  upload size, type the maximum file  size (in MB) that you want to allow to be uploaded.

6. Click OK.

If IIS is timing out when you upload large  files, you can configure the Connection timeout setting in IIS to allow more than the default 120 seconds (2 minutes).

Tune the IIS connection timeout

1. Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.

2. Right-click the virtual server you want to configure, and then click Properties.

3. Click the Web Site tab.

4.In the Connections section, in the Connection timeout box, type the number of seconds you want IIS to wait before timing out.

5. Click OK.

Wednesday, 24 August 2011

IIS Stopped Automatically in sharepoint

  1. Log on to the server that hosts the service, application pool, or Web site.
  2. Click Start, click Administrative Tools, and then click Computer Management.
  3. In the navigation pane, expand Services and Applications.
  1. Perform one of the following steps based on what element you want to stop or start:
  2. For a service, click Services, right-click the service, and then click Stop or Start.




  • For an application pool, click Internet Information Services (IIS) Manager, expand the local computer, and double-click Application Pools. Right-click the application pool, and then click Stop or Start.

  • For a Web site, click Internet Information Services (IIS) Manager, expand the local computer, and double-click Web Sites or Sites.

  • If the server is running Windows Server 2003, right-click the Web site, and then click Stop or Start.
    If the server is running Windows Server 2008, right-click the Web site, point to Manage Web Site, and then click Stop or Start
    .

Tuesday, 9 August 2011

Backup(Import and Export) Using STSADM command for sitecollections and webapplications

When you back up by using the Stsadm command-line tool, you can back up individual aspects of your SharePoint Products and Technologies deployment. For example, you can back up an individual site collection or you can back up the entire farm.

To export sites from your SharePoint Products and Technologies deployment, you use the following Stsadm command.

Syntax :- Stsadm –o export –url <URL> -filename <FileName>.cmp

To back up a site collection, you must use the following stsadm command.

Syntax :- stsadm –o backup –url <URL of the site collection> -filename <Name of the backup file>

To back up an individual database, Web application, or the entire farm, you can use the following Stsadm command.

Syntax :- stsadm –o backup –directory <UNC path or local drive> -backupmethod <Full or Differential>



Restore

To import sites to your SharePoint Products and Technologies deployment, you use the following Stsadm command.

Syntax :- Stsadm –o import –url <URL> -filename <FileName>.cmp

To restore a site collection, you must use the following Stsadm command.

Syntax :- stsadm –o restore –url <URL of the site collection> -filename <Name of the backup file>

To restore an entire farm you can use the following Stsadm command.

Syntax :- stsadm –o restore –directory <UNC path or local drive> -restoremethod <overwrite or new>


Friday, 5 August 2011

Target a webpart to audience

Target a Web Part to an audience

Microsoft Office SharePoint Server 2007 Web Parts can be targeted to appear only to people who are members of a particular group or audience.
An audience can be identified by using a SharePoint group, a distribution list, a security group, or a global audience.
  1. On the Web page that contains the Web Part, on the Site Action menu menu, click Edit Page.
  2. On the Web Part, click the Web Part menuWeb Part Edit Menu , and then click Modify Shared Web Part.
  3. Under Advanced, add one or more audience names to the Target Audiences list.
When the page is rendered, the Web Part appears only to the people who are members of the audiences you specified.

How to Enable Audience targetting

Step 1: Enable audience targeting on the list or library

When you enable audience targeting on a list or library, you can target each item in the list or library to an audience.
 Note   If the SharePoint list or library already is enabled for audience targeting, the Target Audiences column appears.
  1. Click the list or library that contains the item you want to target.
  2. On the list toolbar, click Settings, and then click List Settings or Document Library Settings.
  3. Under General Settings, click Audience targeting settings.
  4. Select the Enable audience targeting check box.

Step 2: Specify the target audience on the items

After you enable the list or library for audience targeting, you can set individual items in the list or library to be displayed to one or more audiences.
  1. Click the arrow next to the name of an item in the list or library, and then click Edit Properties.
  2. In the Target Audiences list, add one or more audiences.
 Note   If content approval or workflow is enabled on the list or library, the item may need to go through the approval process.

Step 3: Display the item in a Web Part

To display the list or library item to a specific audience, you can use the Content Query Web Part. The Content Query Web Part allows you to build a query that can filter list and library items.
This example shows you how to display all of the the items from a specific list to a target audience. The list type is document library.
Find links to more information about other settings in the Content Query Web Part in the See Also section.
  1. On the page where you want to display the item, on the Site Actions menu menu, click Edit Page.
  2. Click Add a Web Part, and then under Default, click Content Query Web Part.
  3. Click Add.
  4. Click Edit and then click Modify Shared Web Part to open the tool pane (tool pane: A task pane on a Web Part Page used to browse, search for, and import Web Parts from Web Part galleries, and to modify custom and common Web Part properties.) for the Web Part.
  5. In the tool pane, under Query, click Show items from the following list and then specify the location of the list.
 Note   In this example, we specify a particular list. You can broaden the scope to include items in lists from more than one site by clicking one of the other options.
  1. Under List Type, choose the type of list that the item is a member of. In this example, click Document Library. Only items in the list type that you choose are processed by the query.
 Note   This setting is required.
  1. Under Audience Targeting, do the following.
ToDo this
Display the list items to the target audience that you specified in Step 2: Specify the target audience on the items, when the current user is a member of the audience.Select the Apply Audience Filtering check box. This is required for the query to work properly.
Also display the items in the list that do not have a target audience specified. These items are displayed to everyone.Select the Include items that are not targeted check box. This is optional.
When the page is rendered, the content in the Web Part appears only to current users who are members of the audiences you specified.