Wednesday 25 May 2016

Import User Photos From Active Directory Into SharePoint 2013

Asalamalekum,

In this post I’ll describe how you can import user photos from Active Directory (AD) into SharePoint 2013 and add them to SharePoint user profiles.
Firstly you’ll need to get your users’ photos into AD.  I use AD Photo Edit from Cjwdev.  The bulk edition is fantastic as it has command line support.
Once the user photos are in AD you need to update the SharePoint user picture property  .  Open Central Administration and navigate to your User Profile Synchronization Service Application.  Click on Manage User Properties.

SPUP-1
Scroll down to the Picture property and choose Edit from the drop down menu.
SPUP-2
Scroll down to the Add New Mapping section.  Choose your AD data connection, select the thumbnailPhoto attribute and click Add, followed by OK to save the change.  This maps the SharePoint picture property to a user’s photo attribute in AD.
SPUP-3
Run a full user profile synchronization.
SPUP-4SPUP-5
Once the user synchronization has finished open the SharePoint 2013 Management Shell.  Run Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation %MySiteURL%
SPUP-6

The command could take a while to run.  When it’s finished click on Manage User Profiles and search for a user and click on Edit My Profile.
SPUP-7 SPUP-8

The picture has been added to the profiles.


Thursday 19 May 2016

Create multiple file attachment field in Infopath form

Perform the following steps to create a multi-file attachment in InfoPath:
  1. Add a Repeating Table with 1 column to your InfoPath form template.
  2. Go to the Data Source task pane and double-click the field under the repeating node for the Repeating Table.
  3. Change the Data type to Picture or File Attachment (base 64) and click OK.
  4. Right-click the field in the Repeating Table on the InfoPath form template, and select Change To, and then File Attachment from the context menu that appears.
That is how you can attach multiple files in InfoPath.

Thursday 12 May 2016

Types of Site Template

Team Site

Basic Search Center SRCHCENTERLITE#1 The Search Center template creates pages dedicated to search. The main welcome page features a simple search box in the center of the page. The template includes a search results and an advanced search page. This Search Center will not appear in navigation.

Community Site COMMUNITY#0 A place where community members discuss topics of common interest. Members can browse and discover relevant content by exploring categories, sorting discussions by popularity or by viewing only posts that have a best reply. Members gain reputation points by participating in the community, such as starting discussions and replying to them, liking posts and specifying best replies


Enterprise Search Center SRCHCEN#0 A site focused on delivering an enterprise-wide search experience. Includes a welcome page with a search box that connects users to four search results page experiences: one for general searches, one for people searches, one for conversation searches, and one for video searches. You can add and customize new results pages to focus on other types of search queries


Business Intelligence Center BICenterSite#0 A site for presenting Business Intelligence content in SharePoint.

Records Center OFFILE#1 This template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site also lets you manage whether records can be deleted or modified after they are added to the repository.
Team Site STS#0 A place to work together with a group of people.
Blank Site STS#1 A blank site for you to customize based on your requirements.
Document Workspace STS#2 A site for colleagues to work together on a document. It provides a document library for storing the primary document and supporting files, a tasks list for assigning to-do items, and a links list for resources related to the document.

Blog BLOG#0 A site for a person or team to post ideas, observations, and expertise that site visitors can comment on.
 
Developer Site DEV#0 A site for developers to build, test and publish apps for Office

Create SharePoint Site on a New Content DB (Powershell Script)

#Create a SPSite in a new content database
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue;

$sitename = "IT";
$webAppUrl = "http://intranet2013.sabinatechdiary.com";
$template = "STS#0";

$ownerAlias = "Sabinatechdiary\Sabina";
$secondaryOwnerAlias = "sabinatechdiary\Robin";

$siteurl = "$webAppUrl/sites/$siteName";
$databaseName = "SharePoint_Intranet_$siteName";
$databaseserver = "sql2012primary.sabinatechdiary.com";

New-SPContentDatabase -Name $databaseName -DatabaseServer $databaseserver `
                       -WebApplication $webAppUrl;

New-SPSite -Url $siteUrl -OwnerAlias $ownerAlias -SecondayOwnerAlias $SecondaryOwnerAlias `
                        -ContentDatabase $databaseName -Template $template -Name $siteName;

# New-SPSite does not create the default groups
$web = Get-SPWeb  $siteUrl;
$web.CreateDefaultAssociatedGroups("i:0#.w| $ownerAlias", "i:0#.w|$secondaryOwnerAlias",$siteName);
$web.update();