2010 - How can I change Document library permissions for all site collections using powershell?

Total Powershell newbie here, but I have managed to write a couple scripts so far that have been working.We are using 2010 Enterprise edition, and I have been tasked with creating a script that will add a new Document Library to every site collection....No problem, got that one created. But the kicker on this was that they want the document library to be hidden from all users except for Site Collection Administrators. I have searched for 2 days straight (Google isnt returning any blue links anymore, just purple haha) and have not been able t...Read more

2010 - get Library document URL using Javascript client object model

I am working with SP.js to get data from a SharePoint library.Below is the code i am using:var clientContext = new SP.ClientContext(); var oList = clientContext.get_web().get_lists().getByTitle(listName); var camlQuery = new SP.CamlQuery(); camlQuery.set_viewXml('<View Scope="RecursiveAll"><Query><OrderBy><FieldRef Name="Title" /></OrderBy></Query></View>'); this.collListItem = oList.getItems(camlQuery); clientContext.load(collListItem); clientContext.executeQueryAsync(Function.createD...Read more

2010 - How do I get a collection of document libraries using Javascript CSOM?

I'm working on an UI feature for my SP2010 site and would like to display a number indicating how many documents were added to a specific library since the users last visit.The UI will display a box on the left hand site of the screen, listing all document libraries on the current web and then how many documents were added since the users last visit.I already know you can get all lists by doing:var context = new SP.ClientContext.get_current();var lists = context.get_web().get_lists();But how can I get all document libraries as they are of a dif...Read more

Recommended Visual Studio solution design for new SharePoint 2010 intranet

I'm currently working on a large SharePoint 2010 published intranet development project. The initial months of planning have been completed and we're now gearing up to commence the actual dev/build.At a glance, our overall solution comprises the following applications:An intranet site (publishing portal)A separate collaboration portal (team sites)My Sites FYI: All these applications will be hosted in the cloud (SharePoint Online) and as such must be deployed using sandbox solutions.What would be the best way to structure our Visual Studio sol...Read more

2010 - Search using column name and term

I would like to be able to set up the search so that users can search by a column name and term (CustomColumnName:baseball). I have set up a managed property and it has gone through a full crawl. Though when I put the columnname:term in the search box nothing comes back. Not sure what I am missing. Any and all help is welcome.SharePoint 2010...Read more

2010 - Search list with appending text field history

I have a list with several thousand items in it. The list has a text field called "Actions" that is set to "append changes to existing text". This field is used to record details of actions taken.What appears to be happening is that only the latest version of the list item is indexed, so if I search for a term that exists in a previous version of an item, it won't be found. What I'd like to be able to do is use the search to quickly find an item based on the content of the Actions field, in particular over any text entered into the field in...Read more

2010 - Remove domain web adress rule in search scope using powershell?

This is what we do to remove a rule from a search scope:$scope = Get-SPEnterpriseSearchQueryScope -Identity $scope -SearchApplication $ssa;Get-SPEnterpriseSearchQueryScopeRule -Scope $scope -Url $rule | Remove-SPEnterpriseSearchQueryScopeRule -Url $rule -Confirm:$false;This is working perfectly for rules of type "Folder". See the sceenshot.Now, I would like to do the same with rule of type "Domain". See the screenshot again:Thank you very much....Read more

All SharePoint 2010 "approval process" failed on start

I have tried OOTB approval workflow, as well as a custom list workflow (using Approval process action). Both failed on start immediately. Every time the error pattern is the same:Status immediately become "Failed on start". The first workflow history is "xxxx was canceled by system account".I tested run a workflow without Approval process (e.g. log in history) and completed successfully. I created a new site collection and create a new SP2010 approval workflow, it failed in the same way.What could be the reason?...Read more

2010 - How can I stop the same email from sending by a custom workflow twice?

I have a custom workflow I made in SPD that sends an email to different people depending on the value of a column, in this case it's when it's their turn to edit a document. The person will get an email from the workflow notifying them of the task, and then they edit the document. Then when they save the document, they will get the same email again since the document has changed, but the document property hasn't. Then they will have to go to the document and edit the property to assign the task to the next person.The workflow is: If current ite...Read more

2010 - Guess SharePoint version based on connection parameters

My client application uses the SharePoint Client Object Model against SharePoint 2010 and 2013. I would now like to add support for SharePoint Online.Users of my application specify the 'Url' to their SharePoint site and their credentials. Since connecting to SharePoint Online requires using the 'SharePointOnlineCredentials', I would like to guess which version of SharePoint is being targeted based on these values and then use the appropriate credentials type.Certain heuristics that I currently useIf the username is of the form DOMAIN\username,...Read more

2010 - Convert Choice field value into Date format using Calculated column

I have a choice column in which choices are name of months. I want a calculated column which returns me the date format data.Choice Column | Calculated Column ----------------------------------- January | 1-Jan-1990 February | 1-Feb-1990 March | 1-Mar-1990 April | 1-Apr-1990 May | 1-May-1990 Date and year can be anything but I want to sort this data month wise. If I use choice column to sort data it will sort it alphabetically. But I want to sort the data in Month wise.Is there any formula...Read more

2010 - How to show Document Set Version?

In SharePoint 2010, there is a new content type called Document Set that allows users to work with multiple documents as a single work product.In our case, the Document Set's version number is very important to our users, and this Document Set version history increases every time you go to Document Set -> Manage -> Capture Versionand you can see the version history of the Document Set by clicking on the Document Set's Version History (this is the version we are interested in)However, SharePoint seems to only expose the Document Set's metadata v...Read more