Thursday, November 13, 2014

SharePoint 2013: “Nice-to-Haves”

I've been working with SharePoint 2013 for about a year now, and it’s been quite the adventure...or not. From the revamped user interface to the new Search configuration via PowerShell, sometimes I just can’t help but shake my head at some of the unnecessary complexities that Microsoft bestows upon us SharePoint Admins. I have compiled the following list of key pieces of functionality that I would consider to be “nice-to-haves” while working with SharePoint 2013. By the looks of it, I’ll probably be posting a Part 2 of this topic within the next six months. Ugh!

-  Why has the Check-Out dialog box disappeared?













I have opened a case with Microsoft regarding this issue. Their response thus far:

"I would like to inform you that we have been discussing this known issue with our Product group and are in process of evaluating the same. As this issue stands as an integration with Adobe, we are planning as to how best we can address this issue making sure that future fix doesn’t break it."

Fingers crossed they provide a fix soon.

-  No Site Permissions listed in the site settings drop-down menu? One extra click to see who has access to your site.
















-  Bring back the tabs for the top level navigation items!
-  Upon selecting the ‘new document’ link to create a new page, please prompt me so I can select the type of page I actually want.
-  It would be nice to still have the ability to create and modify the Search topology via the GUI.
-  Better support for non-office files, such as .dwg.
-  Contribute (not Edit) as the default permission level for all Members groups. Why change it now?
-  Deleting ‘Profiles Missing from Import’ actually works as intended, particularly for those who have disabled the My Site Cleanup Job.
-  Org Chart on everyone's own My Site by default.

SharePoint used to be fun…really fun. Not so much now days. :(

Thursday, July 24, 2014

SharePoint 2013 Search: "The server is unavailable and could not be accessed. The server is probably disconnected from the network."

I recently experienced an issue of of a single content source not crawling in the SharePoint 2013 Search Service Application. The crawl log gave the following error:

"The server is unavailable and could not be accessed. The server is probably disconnected from the network."

I had already added the infamous DisableLoopBackCheck fix when I initially deployed the farm, so I knew that wasn't going to be the solution.

The following steps fixed the issue for me:

1) Open the registry on the Central Administration server.
2) Navigate to HKLM\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0.
3) Right-click MSV1_0 and add a new Multi-String Value. Give it a name of BackConnectionHostNames.
4) Double-click to modify the newly created BackConnectionHostNames item. Add the FQDN of each web application you want to crawl, one per line. Select OK.
5) Perform an IIS reset.

Should be able to successfully crawl the content source now.

Tuesday, July 15, 2014

Best Practice: Migrating and converting SharePoint 2010 web applications from Classic-Mode to Claims-Based Authentication in SharePoint 2013

For migrating and converting SharePoint 2010 web applications from Classic-Mode to Claims-Based Authentication in SharePoint 2013, the following steps work best for me:

1. Create new classic-mode web application in SharePoint 2013, using PowerShell.



2. Restore and attach the content database from SharePoint 2010 to SharePoint 2013.



3. Deploy farm solutions as needed on the upgraded web application in SharePoint 2013.

4. Perform an IIS reset on Central Admin server and each WFE server in the SharePoint 2013 farm.

5. Ensure you can access the site collection in default Windows classic mode.

6. If you have a custom security trust config file, manually copy the file from a SharePoint 2010 WFE server to the Central Admin server and each WFE server in the SharePoint 2013 farm. C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG.

7. If you perform step 6 above, you will also need to manually add the open and closing security policy tag to the web.config file on the Central Admin server and each WFE server in the SharePoint 2013 farm, directly under the system.web opening tag.



8. Convert the web application to Claims-Based Authentication.



9. Run the usermigration_Claim.ps1 script, provided by Karim.

usermigration_Claim.ps1

10. Perform an IIS reset on Central Admin server and each WFE server in the SharePoint 2013 farm.

11. Ensure users can successfully access sites in the converted web application.

Wednesday, July 2, 2014

SharePoint 2013: Add user profile properties to People search results

By default, People search results in SharePoint 2013 only shows the Job Title and Department user properties. You can add additional user properties using a custom Display Template by following these steps.

1. On the Search Center site, go to Site Settings, Master pages and page layouts, Display Templates, and Search. Download a copy of the Item_Person.html file to your desktop, and open the file in your favorite editor. In the mso:managedpropertymapping section, add your user properties in the same format as the existing ones. For example, the Mobile Phone user property would be:

'MobilePhone':'MobilePhone'

Be sure to separate all newly added user properties with a comma.

2. In the variable declarations section, add your additional user properties in the same format as the existing ones. For example, Mobile Phone would be:


3. In the section below the variable declarations section, add each additional user property's DIV content in the same format as the existing ones. For example, Mobile Phone would be:


Be sure to add each user property in the appropriate order in this section. So, if you want Mobile Phone to be located after the Work Phone property in People search results, add the Mobile Phone DIV content directly after the Work Phone DIV content.

4. Save and rename the the file to to something specific to your organization, such as Item_Person_Contoso.html.

5. Upload the file to the same location where you initially copied the file (Search Center site, Site Settings, Master pages and page layouts, Display Templates, and Search). Be sure to check in and publish a major version of the file.

6. Edit your peopleresults.aspx page, and then edit the People Search Core Results web part. Expand Display Templates, select Use a single template to display items, and then select your custom Display Template. Save the web part. Check in the peopleresults.aspx page and publish a major version.

Test People search results and ensure the properties are there. All done.

A few notes:

If some of the user properties don't show in the search results, you may have to tweak them a little. In particular, I have noticed the following:

Email = WorkEmail
Mobile Phone = MobilePhone
Office = OfficeNumber

To get the email address to show as a link, add the anchor tag to the DIV content as shown in the example below:

Monday, June 2, 2014

Access Denied after performing database attach upgrade from SharePoint 2010 to SharePoint 2013

After performing a database-attach upgrade from SharePoint 2010 to SharePoint 2013, you may discover that your users are getting the Access Denied message.









If so, look no further than the default claims-based authentication functionality in SharePoint 2013. By default, claims-based authentication mode is used for web applications created in SharePoint 2013. In fact, you cannot create a new web application using classic-mode at all from within the SharePoint 2013 Central Administration site.

Microsoft recommends two primary methods of migrating from classic-mode to claims-based authentication in SharePoint 2013. See article below.


1) Convert SharePoint 2010 classic-mode web applications to claims-based authentication in SharePoint 2010, and then migrate to SharePoint 2013.

2) Migrate SharePoint classic-mode web applications to SharePoint 2013 classic-mode web applications, and then convert the SharePoint 2013 classic-mode web applications to claims-based web applications.

I chose the second option because the first option just seemed too risky. Once finished, all users were able to successfully logon. Of course, it required me to delete the existing SharePoint 2013 claims-based web application and recreate it in classic-mode. To do this, you must create the web application using PowerShell.

Tuesday, May 6, 2014

PowerShell: Update a column value for a subset of documents in a document library using a CSV file

I recently had the need to update the column value for a subset of documents in a document library. I was given a CSV file with the Title of each file that needed the updated value. The column in the document library that needed updating was named DeleteFlag.

After some googling, I came across the following blog post that would serve as the basis for my solution. Once again, PowerShell to the rescue!

http://technology-23.blogspot.com/2012/08/update-sharepoint-library-from-csv.html#!/2012/08/update-sharepoint-library-from-csv.html

Here are the steps to my solution.

1) Add another column in the CSV file to match the column you want to update in the SharePoint library. As indicated above, the column name for me was DeleteFlag. Be sure to also add the value(s) as needed for the new column. In my case, I had a single value for all items. Copy the file to the SharePoint sever where you will run the PowerShell script.

2) Create a new .ps1 file (using Notepad) and copy/paste the following.

Change the $url, $data, and $list variables to reflect your environment. As you can see, the script matches the Title in the CSV file with the Title in the document library, and then updates the DeleteFlag column for each item in the document library with the value in the DeleteFlag column for the matching items in the CSV file.

3) Copy the .ps1 file to the same SharePoint server where you saved the CSV file.

4) Run the .ps1 file and site back and watch the magic happen!

Monday, April 21, 2014

SharePoint Designer: Conditional Formatting using a Sum Calculation

Just a quick tip I wanted to pass along --

In SharePoint Designer, if you have a need to apply conditional formatting to cells in a List column based on the value of a sum calculation in another cell, follow these steps:

1.  In Design view, click the td.ms-vb tag to select the entire cell that needs conditional formatting, select Conditional Formatting in the ribbon, and choose the Format Selection option. In my example below, the cell that I selected is in the Cost Score column.

2.  Click the Advanced button in the Condition Criteria dialog box.

3. For the XPath expression, ensure you include the ../Row in the sum calculation. In my example below, I am applying conditional formatting to each cell if its Cost Score value is less than the average of all cells in the Cost Score column.



4. Select OK and Set Style as you desire.

Hope this helps!

Wednesday, April 9, 2014

Automating User Profile Photo Import in SharePoint 2013

To automate the User Profile Photo Import process in SharePoint 2013, please use the following sequence.

Prerequisites: User photos must be added to Active Directory and the thumbnailPhoto attribute must be mapped to the Picture property in the User Profile Service Application.

1) User Profile Incremental Synchronization. In the User Profile Service Application, select Configure Synchronization Timer Job. Define a recurring schedule. I scheduled mine to run Daily at 10:00am.

2) Create and schedule a PowerShell script for running Update-SPProfilePhotoStore.

- On one of the application servers in the farm, open Notepad. Copy and paste the following and save it to a desired location as PhotoImport.ps1.



- Open Task Scheduler on the server. Select to Create Task.

General tab:




Triggers tab: (NOTE: Ensure the time is scheduled after the User Profile Incremental Synchronization schedule above, and ensure you schedule enough time for the User Profile Incremental Synchronization task to complete. 30 minutes should be sufficient.)







Actions tab:








Program/script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Add arguments (optional): -psconsolefile "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG\POWERSHELL\Registration\psconsole.psc1" -command "D:\Scripts\PhotoImport.ps1" 

- Leave the defaults for the Conditions, Settings, and History tabs. Select OK and type in the logged on user password when prompted.

3)  Incremental Crawl of People Content Source. In the Search Service Application, Edit the Content Source that contains the people address (sps3://mysiteurl). Create an Incremental Crawl schedule as needed. Ensure the time is scheduled after the scheduled task in step 2 above.





Each time the automated 3 step process above is run, it will update the photos in each user’s profile page and in the People search results.

Wednesday, March 26, 2014

Short URLs for SharePoint using HTTP Redirect in IIS 7

A quick and easy way to create a short URL for a SharePoint location is to use the HTTP Redirect module in IIS 7.

1) Open IIS Manager.

2) Expand the Site where you want to add the short URL. You will see the virtual directories.

3) Right-click on the Site and select to Add Virtual Directory. Type in an Alias to be used as the URL suffix. For example, if your root Site URL is http://teamsites and you use an Alias of "forms", the short URL will be http://teamsites/forms. For the physical path, I recommend browsing to the C:\inetpub\wwwroot\wss\VirtualDirectories directory and creating a new folder there with the same name as the Alias. DO NOT create the new folder under the same directory as the root Site (e.g. C:\inetpub\wwwroot\wss\VirtualDirectories\teamsites). This will cause the root site to be redirected as well. Select OK to create the new virtual directory.











4) Select the new virtual directory under the Site. In the Features View, double-click the HTTP Redirect icon.

5) Check to Redirect requests to this destination, and enter the long URL. For the Redirect Behavior section, only select to Redirect all requests to exact destination (instead of relative to destination). Leave the Status code as is and click Apply in the Actions pane on the right.












Perform all steps on every WFE in your farm.

When done, upon browsing to the short URL you will be automatically redirected to the long URL.

Friday, March 14, 2014

Project Server 2010: Prompted for SQL Server Login upon editing Business Intelligence Center reports in Excel client application

While working on a PWA site, you attempt to edit reports in the Business Intelligence Center using the Excel client application and receive a SQL Server Login dialog box, as shown below.


To resolve this issue, ensure the Active Directory user or group has the db_datareader role on the PWA reporting database. When editing reports, the Excel client application connects directly to the PWA reporting database using the credentials of whoever launches it, so they must have the correct permissions in SQL.

Also, keep in mind that the Excel Web App uses the Secure Store Service for opening and refreshing reports in the Business Intelligence Center, not the logged on user credentials as in the Excel client application. To see who can open and refresh reports in the Excel Web App, go to Central Administration -> Manage service applications -> Secure Store Service. Click on the Target Application ID, click Next twice, and see the Members. Add the Active Directory users or group as needed.