In general, we can delete the columns using UI from SharePoint pretty easily. But some columns are not allowed to be deleted using UI but are allowed to be deleted using PowerShell. But there are some columns which are not deleted from PowerShell as well without some tweaks.
Orphaned Content Database – By orphaned content database I mean that the content database is not associated to any web application and is not visible by using Get-SPContentDatabase command.
So, what is the need of removing the Orphaned Database. Recently, I accidentally removed a database and added it back but somehow it was not adding back and displaying the message that database already exist when I was trying to add the database using the UI or using PowerShell.
So, the way to see is the database present in the farm is to run the following command:
Get-SPDatabase | Select Name, Id
It would display the list of all the databases associated with any service application or web application or any other database present/associated with SharePoint. In this list the orphaned content database would also be listed.
In order to remove just get the database and execute delete method. It would only remove the association with the farm.
$db = Get-SPDatabase -Identity "<GUID>"
Now again, if you run the following command the orphaned content database would not be present anymore.
Get-SPDatabase | Select Name, Id
I couldn’t find any blog/article anywhere related to this, hope it might help someone.
Sometimes when we try to install patches in SharePoint environment we face the error stating
An error occurred while running detection.
This is due to a reason that SharePoint couldn’t recognize whether the version of the patch that is going to be installed is valid for your environment or not.
This is quite annoying message from SharePoint. This error would be encountered whenever you want to make any changes or try to add list item, create a site, basically adding anything into SharePoint.
Let me give you a brief about what Office Web App Server is for those who don’t know what it is used for. Its basically a server which provides the Office Services to edit or view the office documents in the browser itself without the need of office installed on local machine of end users.
Installing OWA Server on Windows Server is not a pain until its Windows Server 2012 R2. Normally one would think like SharePoint it would give the list of pre-requisites which would be installed automatically but it doesn’t do that.
Recently, I encountered a requirement to extract the wsps from SharePoint Content Database and extract its contents. Extraction of WSP is already mentioned in many blogs. So, I would just guide how to extract the WSP contents.
Following is the command which is used to extract the WSP contents and saves its contents to a particular path:
expand <FullPathToWSP> <DirectoryWhereFileNeedsTobeExtracted> -F:*
The above command is a built-in Windows utility which extracts the content of WSP. Following is the example of the above mentioned command.
expand C:\mySolution.wsp C:\SolutionExtract\mySolution -F:*
Change password of a Managed Account in SharePoint
You might found a lot of scripts for doing the same task in SharePoint 2010 Managed Shell. But I would add on to the problem I faced in changing the password after listing the command for the same.
Following is the algorithm to change the password:
- Get the appropriate managed account.
- Get the password and change the password to secure string.
- Set the password.