02 September, 2013

Remove/Delete user from all SharePoint groups in the web application/site collection – SharePoint 2010

This is one of the requirement in which one of our admin changed the project so it means he will no longer be a part of any SharePoint site collection or any web application.

By considering this requirement, we need to remove this specific users across all site collections, all groups, all web applications…


Here is the script for the same:

$URL="https://Sharepoint2010SiteURL"
$site =Get-SPSite($URL)
$web = $site.OpenWeb()
$groups = $web.sitegroups
$user = $web .AllUsers.Item("name of user")
foreach ($spgroup in $groups)
{
   $spgroup.RemoveUser($user)
   $spgroup.Updae()
}

If you have any queries/questions regarding the above mentioned information then please let me know, Thank you.

Copy documents between libraries by preserving their metadata – SharePoint 2010

Copying documents as well as list items across list’s and libraries is very easy but preserving metadata is the main concern.

No need to worry about anything as this blog will provide you the answer for the same.

There are two options are available to achieve this functionality:
1)   Content and Structure
2)   Export and Import

I have already written articles for the same and this process will preserve the metadata.


Here are the links for the Export and Import:


Note: Please refer sections: Backup of the list and Backup of the library


Note: Please refer section: How to Restore the List/Document Libraries


If you have any queries/questions regarding anything then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Copy/Move a document between Web Applications + Site Collections + subsites - SharePoint 2010

Lists and Libraries are being extensively used in SharePoint as it’s a collaboration product. Common functionalities that we do on regular basis includes create document libraries and lists, uploading documents, create items, manage permissions at the library level / list level / Item level , manage versions and so many things…

Today’s article is based on the same as how to transfer/copy/move items between web applications/site collections/subsites.

Note: Make sure this feature ‘SharePoint Server Publishing Infrastructure’ should be activated before applying the following steps.

How to check this:
1)   Open the site
2)   Site actions
3)   Site settings
4)   Site collection administration
5)   Site collection features
6)   Activate this feature ‘SharePoint Server Publishing Infrastructure’

Note: If you can’t see the site collection administration then it’s because of permissions, you should be listed as ‘site collection administrator’ to view that option. If you don’t have rights then please contact the assigned site collection administrators to activate that feature.

Coming back to the main article where we are going to see the actual process:

Would like to explain this by means of example:

Suppose there are two sites: site A and site B

Site A: Root site and site B: subsite
1)   Open the site A
2)   Site actions
3)   Site settings
4)   Site administration
5)   Content and structure
6)   Select the list or document library from the left hand side- click on it.
7)   Associated items will be reflected in the right hand side pane.
8)   Actions
9)   You will get the options as Move, copy and delete.


As soon as you will click on copy/move, you will get another dialogue box to select the destination site/ site B + library/list.




Select it and click OK

Items will be successfully moved to destination house.

Note: If you have any confusion regarding this process then i would request you to select the COPY option as it will not completely rid-off the source library items and only replicate it to the destination library. Once items will be successfully moved then you can delete the source library/list as per your requirements.


If you have any queries/questions regarding the above mentioned information then please let me know, Thank you.

01 September, 2013

This page contains content or formatting that is not valid. You can find more information in the affected sections - SharePoint 2010

Problem description:
You have an ASP.NET control that contains validation controls in the masterpage or page layout for a publishing site (an ASP.NET login control for example). When you try to edit and check in a publishing page you receive the following error.

Error message:
This page contains content or formatting that is not valid. You can find more information in the affected sections.

Resolution:
Million Thanks to Ari Bakker's SharePoint Config blog who helped me to resolve this issue. Please have a look, it’s too fabulous:


Product applies to:
-SharePoint Server 2010
-SharePoint Foundation 2010

References:




Cannot change item-level permissions because this list or document library contains a column that enforces unique values - SharePoint 2010

User wanted to make some permission level changes on the survey. So that Users can read or edit only their surveys.

We went to the advanced settings. Tried to change it to



We got an error

"Cannot change item-level permissions because this list or document library contains a column that enforces unique values"

We then tried researching and then found that one column "Title"

had that option set to yes as below


We tried to make some changes in the same column from choice to single line of text and enforce unique values to no

However we got one more error.

"The type of this column cannot be changed because it is currently being indexed”

Ahhh... Now we first took a backup of the survey list.

We then created a new column which worked fine. Then deleted the Title Column

And we were able to make the changes.

We were able to now make the changes in the advanced settings. As there was only one column which had that option checked.

Product applies to:
SharePoint Server 2010
SharePoint Foundation 2010