The SharePoint snap-in needs to be loaded before you can execute commands against the SharePoint object model. This snap-in is automatically loaded for you by the SharePoint Management Shell. But the SharePoint management shell does not offer many of the advantages that PowerShell ISE offers (like debugging with breakpoints, etc). To get PowerShell ISE to autoload the SharePoint snap-in, follow the steps in this article.
This is where I log all things SharePoint. I have worked on various versions of SharePoint. So, each post will usually specify what version I'm talking about (some times, the post will apply to pretty much all versions). Beyond SharePoint, this section may also hold content pertaining to other related Microsoft technologies like Office 365, Azure, C# (C Sharp), PowerShell, etc.
All versions of the SharePoint user interface provide an option to change the title (or display name) of a list or library. Changing SharePoint library URL (or internal name), however, is not exactly very intuitive. We will discuss the process in this article.
There are certain scenarios where the drag and drop method of uploading files to SharePoint document libraries is not desired. Here’s a quick way to disable this feature.
Say you have a SharePoint workflow which runs whenever a list item changes (ItemUpdated). You also have some custom code to do some manipulation on the same list item at the end of which you need to perform an item update using one of the SPListItem update methods: Update(), Systemupdate() and UpdateOverwriteVersion(). You will quickly notice that this update will trigger another instance of the workflow for this item once the current workflow terminates. You have just hit an infinite loop.
Fix for new SPSite object error: “The Web application at [URL] could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.”
I have often needed to manage web parts programmatically in SharePoint using the server object model. While the requirements have varied depending on the specific situation, common things I have needed to do include programmatically adding, deleting and/or moving either custom webparts or OOTB web parts. I have also had to programmatically modify some OOTB web parts using the SharePoint server object model. I have an example of how to do this for the content editor web part in the last section of this article. This article provides quick code samples to manage web parts programmatically. Copy and paste and enjoy!