A couple of weeks earlier, I saw an interesting issue. It was a normal day as far as days go in support and in comes this issue, where the person in question wants to investigate or rather should I say automate the process of creating IRM settings on document libraries. I wasn't working on this issue and a colleague took this over. But then somewhere it was lurking, how the hell do you do that? The natural starting point is getting a site/web context and going down to the list and then getting dirty with the properties exposed by the particular SPList object. So after finishing what I had on my plate, I dug into figuring out how exactly to set the IRM settings for a list using the object model. So here goes: Step 1 Enable IRM on the farm SPWebService svc = SPFarm.Local.Services.GetValue<SPWebService>(); SPIrmSettings irmSettings = svc.IrmSettings;irmSettings.IrmRMSEnabled = true;//set true or false based on the situation irmSettings.IrmRMSUseAD = true; irmSett
Today i have faced one issue while mount content database to server. the issue is " This content database has a schema version which is not supported in this farm." I was getting this error when i ran Mount-SPContentDatabase using powershell. I tried checking SP versions and other things finally got solution in below way Reason: Once you have taken the backup from SharePoint 2013 content database, usually you will restore the database in the target SQL server. After restoring the database, you will try to restore content database in any one of Webapplication most probably new one. In this stage, you will get the above error message. Solution: Your source SQL server schema and the destination SQL server schema might not be matched. So you need to update the "Versions" table values in the "Restored Database". 1. Open " Versions " table from any of the existing "Content database" from the Target SQL Server machine in "
I was looking at the analytics of the site the other day and I noticed that my post, Adding and Deploying Solutions with PowerShell , currently has the most traffic on the site. I had always intended to write a follow up post on this, so here it is. Today I’m going to talk about how to enable and disable features using PowerShell. It’s great that you know how to deploy solutions now with PowerShell, but now you want to activate your features. In SharePoint 2007 to activate a feature from the command line you might have used a statement like the one below. I’ll use the Reporting feature on my server named sp2010 as an example. The value specified in the name parameter refers to the actual folder name of the feature that is in your SharePoint Root folder (14 hive). stsadm.exe –o activatefeature –name Reporting – url http://sp2010 To get started with PowerShell, run the SharePoint 2010 Management Console located in your Microsoft SharePoint 2010 Products folder on your s
Comments
Post a Comment