Wednesday, May 27, 2015

Problem: Add items greyed out for Anonymous access users. We got to enable anonymous users to add list Items in a SharePoint list.

Solution: By default, Add/Edit/Edit access is disabled for anonymous users. They are granted only with "Read" access. But for a "Contact Us / Feedback" list in our public SharePoint site, we had to enable anonymous user to submit their questions and feedback (add new list items).

So, How to enable Anonymous users to add list items in SharePoint? Follow these steps:

Go to the list settings >> Permissions for this list

Click on "Stop Inheriting Permissions" from Permissions tab of the Ribbon.

You'll see the "Anonymous Access" Icon appearing on the ribbon. Click on that.

If the default home page, say default.aspx page is not published & approved, users get login prompt!

If any referenced resources like images, scripts, css files, etc from other libraries requires authentication - You'll get authentication prompt! E.g. You may have a css style sheet from the library "", which may not allow anonymous access! Check the permission for the specific library and grant anonymous users to "Read" the content.

Navigate to the IIS Virtual directory on File system using Windows Explorer, Go to Security tab, make sure that "Everyone" has Read privileges. If not, Add it!

Before resetting search index, make sure no search crawls are in progress - Stop all search crawls, disable continuous crawl - otherwise, index reset may get stuck! After index reset, You must run full crawl to enable search results!

PowerShell script to reset index in SharePoint 2013:
At times, you may have to do it with PowerShell for reasons, such as:

When you try to reset search index from Web UI, you get timeouts error on large index

Remove Web Application Along with All its Databases and IIS Web Site:
To remove the Web application along with its content databases and the IIS Web site, use the switches: -DeleteIISSite and -RemoveContentDatabases

Monday, May 25, 2015

So you need to determine the best way to manage SharePoint users, Whether to use SharePoint groups or Active Directory groups to manage permissions in SharePoint?

Well, Both SharePoint Group and AD Group have their own advantages and disadvantages. Let me list down some of them:

Manageability: Any SharePoint site owner/admin can manage users on SharePoint groups within SharePoint (Self-Service!). But AD group creation and adding/removing users can be done only by AD administrators, unless delegated. So, to create new users or removing accounts you may have to wait for AD Admins/Help-desk! However, AD Groups Serves better in Centralized management, performance, Minimum administration efforts

Scope: Since AD Groups are created globally, you can re-use them in any different SharePoint site collections (even in different systems like File Shares, Exchange, etc) . E.g. You may be having existing department wise AD groups created, say "Sales Team" and you
can grant permission to any SharePoint site collection to the AD group. But SharePoint groups are scoped at site collection level and can't be re-used beyond that boundary. So, If you have an existing SharePoint group with 5000 users, you'll end-up recreating it in a different site collection (Although PowerShell can help!)

Users from Multiple Authentication Sources: AD Group consists of users from AD, but SharePoint groups can be the combination of users from AD as well as non-Active directory authentication sources like SQL Server, LDAP, Live, Google, Facebook, Yahoo, etc.

List All Usersof the Group - If you want to list users of the group, SharePoint groups can be listed with "Site Users" web part. But you can't do it with AD Groups - You can't look inside them from SharePoint (without custom solutions!) SharePoint considers AD group as a single user.

Nested Groups: AD Groups can be nested, But SharePoint groups can't be added under any other SharePoint group. (However, you can add a AD Group inside SharePoint group!)

Group E-Mails: If you use SharePoint Group, There is no way to send alerts toall of them OOTB, But you can use E-mail enabled AD Group to subscribe to an Alert in SharePoint!

Audience targeting - does not work with AD groups, only with SP security groups!

Orphaned Users - When you delete a user in AD, SharePoint groups can still hold them as orphan users!

Sunday, May 24, 2015

Requirement: Create a SharePoint list from a custom template using PowerShell

How to create SharePoint list from a template?
List templates in SharePoint saves your time by providing template on any existing list or library, which comprises of all columns and optionally the data from the source list. You can create any number of copies from the template (or source list copy)

Assuming you have an existing list template in the site, Here is how to create a list from list template in SharePoint.

Navigate to SharePoint site >> Click on Settings gear icon and click "Add an app"

In "Find an App" search box, enter your list template name such as "Project template". You can also Scroll down and use the pagination to move to the next page (custom list templates will be in second page!) and pick your list template.

Click on the custom list template shown

Provide a name for your new list and click on "OK"

You will see a new list created with same list schema, and also data if you selected “Include Content” when creating the list template originally.

PowerShell script to create a SharePoint list from list template:
Lets create a list using template in SharePointwith PowerShell.

Its a pretty common question and we stuck here often: How to Uninstall SharePoint 2013 completely from the server? Remove Server option From Central Administration >> Servers in Farm page? NO!! You can't uninstall SharePoint 2013 with this option. Remove server option must be used only when a particular server is no longer available and you want to remove it from your SharePoint farm.

Monday, May 18, 2015

Requirement: I came across an issue where the user display name appeared as domain/username instead of First name Last name.

Solution: We observed, If the user profile sync is not properly configured or running, we'll face this issue! Other than UPS solution, You can use PowerShell to update user's display name. PowerShell change user display name in SharePoint 2013:
How to change the SharePoint user display name with PowerShell? Well, You can use Set-SPUser cmdlet. Just provide the account identity, site and the new display name for user user.

Sync User Account Details such as Display Name, E-mail, Department from Active Directory:
Sometimes, user account details may be updated in AD but not synced in SharePoint. If that's the case, you can force sync user account details such as display name, E-mail, department, etc from active directory with the below PowerShell script:

Requirement: I came across an issue where the user display name appeared as domain/username instead of First name Last name.

Solution: We observed, If the user profile sync is not properly configured or running, we'll face this issue! Other than UPS solution, You can use PowerShell to update user's display name. PowerShell to change user display name in SharePoint 2013:
How to change the SharePoint user display name with PowerShell? Well, You can use Set-SPUser cmdlet. Just provide the account identity, site and the new display name for user user.

Sync User Account Details such as Display Name, E-mail, Department from Active Directory:
Sometimes, user account details may be updated in AD but not synced in SharePoint. If that's the case, you can force sync user account details such as display name, E-mail, department, etc from active directory with the below PowerShell script:

Saturday, May 9, 2015

Requirement: Check-in All files which are checked out in a SharePoint document library.

How to Check In all checked out documents in SharePoint 2013:
SharePoint 2013 makes it simpler by providing context sensitive ribbon buttons to check in multiple files in bulk. Simply select all files which are checked-out and click on "Check In" button from the ribbon.

Butthis method doesn't work when you have any required field with no default value assigned!

Check In All Documents in a SharePoint Library using PowerShell
When you do Multiple file upload (bulk upload or through explorer view) and your required column doesn't has any default value in it, then your files will be checked-out automatically. The "Check In" button won't work when you miss-out any required fields in the library.