Tuesday 6 December 2016

Full and Incremental Content Deployment in SharePoint 2010




While working with content deployment I came to know that we can do the full and incremental deployment but I was unable to find the option to do the same through central administration in SharePoint 2010. I came to know there was an option to do the same in central admin of SharePoint 2007.

Then I searched and got hold of an old screen from 2007 where I saw the option to do the same as shown below.The same when I did from the central admin of SharePoint 2010 I did not find any option.


SharePoint 2007 Content Deployment


SharePoint 2010 Content Deployment

These option screen shown above are available when u “create a new Job” as show in the screen below



So how do we create a specific Job of type Incremental or Full? After doing surfing I found out that it can be done using PowerShell. Yes we can create Jobs with using PowerShell rather than the step show in figure 2(Above). Note this script should be run after you have already created the content deployment Path as in my case “Local Deploy”.

New-SPContentDeploymentJob -Name " Local Deploy - Incremental" -SPContentDeploymentPath
"Local Deploy" -IncrementalEnabled:$true

Now if we create a job through UI in central admin by default it will create Incremental Only. Yes and how do we find this out?

To do that, run Get-SPContentDeploymentJob "Local Deploy - Incremental". You should notice the following line in your output:



So how do we create a Job with “Full Content Deployment”

New-SPContentDeploymentJob -Name " Local Deploy - Full" -SPContentDeploymentPath
"Local Deploy" -IncrementalEnabled:$false



Reference Take by : http://sharepointlearningcurve.blogspot.sg/2010/05/sp2010-content-deployment-jobs-missing.html 

Tuesday 15 November 2016

SharePoint 2013 CU August 2013 – "Internet Information Services not installed"

Today it was time to update my SharePoint 2013 installation from March CU 2013 to August 2013 CU.

"Internet Information Service not installed"
After the patching I have to start the Config Wizard. I was a little surprised as it responds with a nice error –  I even tried the PowerShell command in case there is a difference, but no:



What? IIS not installed anymore? Something must be broken with the Patch.

But then I tried to reproduce my steps – of course it must be a user error. After reading the patch script (reading things sometimes helps), I noticed that the script disables the IIS Admin service… it didn't happen on other 12 machines I installed this CU only this one :)



SharePoint does not like that – set it back to Automatic start and start the service.

And then start the config wizard again... Happy Patching!!!


Tuesday 4 October 2016

SharePoint 2013 geolocation column: a component is not installed

Today I was playing with the new geo location column. I added the Bing maps key, created a custom list and added the geo location column via code to that list. Upon submitting a new list item, I received an error, mentioning that a component was not installed, to be able to use geolocation. This is a strange error, because I was able to add the column programmatically, while adding content to the list, is not possible. After checking the Diagnostic log, I noticed the following error:

A required component for using a geolocation field is not installed: Microsoft SQL Server System CLR Types

This remembered me that I had read somewhere (this means: It’s not in the geo location MSDN documentation.It’s written in the documentation on mobile apps and geolocation) that the SQL Server System CLR Types needed to be installed on the Web Front End servers. The package that needs to be installed is called “SqlSysClrTypes.msi”, and depending on the version of SQL that is used

After the installation, I still couldn’t add any items to the list. An IIS Reset didn't work for me but a reboot did the trick.

Thursday 1 September 2016

Content deployment failed, client response text/html expected text/xml

Content deployment job 'NonEng' failed.The remote Web service request failed with this message: 'Exception from HRESULT: 0x80131904'; Details: '<detail><errorstring xmlns="http://schemas.microsoft.com/CmsPublishing/soap/">Exception from HRESULT: 0x80131904</errorstring><errorcode xmlns="http://schemas.microsoft.com/CmsPublishing/soap/">-2146232060</errorcode></detail>'.

Content deployment job 'Eng' failed.The remote Web service request failed with this message : 'Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. '.

If you got these errors in your Content Deployment and wondering what changed, probably the target server is restarted by one of the Admins, and it might have caused this, for me at least it did.

All we have to do is to do a good old IISRESET on the target server and then run the job.

Wednesday 3 August 2016

ProjectServer 2013 environment migration / rollover steps

This blog post will detail the PowerShell commands required to carry out an environment rollover / migration using Windows PowerShell where possible. The steps below use the 2 database approach to rollover over the Production environment to the Test / Development environment.

As a prerequisite I would recommend taking full backups of the Test / Dev farm to enable the environment to be rolled back if required. Use your usual farm backup procedures.

Test / Dev environment Prep

Firstly connect to the Test / Dev Application server and launch the SharePoint 2013 Management shell.

Type the following:

Dismount-SPProjectWebInstance -SiteCollection  <URL of Test / Dev PWA site that you want to refresh with the Production data and config>

Press Enter and then type Y and press Enter to remove the PWA instance

You can check in Central admin in the Project Server Service Application to check that the PWA site has been removed:

Using the SharePoint 2013 Management Shell remove the existing content database from the web application that hosted the PWA site collection that was removed in the previous step.

Type the following:

Dismount-SPContentDatabase “<Database name here>”

Press Enter and type Y to confirm then press Enter

Test / Dev environment SQL Prep

Take a backup of the 2 databases from the Production environment and copy these over to the Test / Dev SQL server and restore the databases. The databases required are:

Content database that contains the PWA site and Project Sites
Project Web App database
Make a note of the database names used when these databases are restored as they will be required later.

Test / Dev environment configuration

Using the SharePoint Management Shell, attach the restored content database to the web application that will host the PWA site collection.

Type the following:

Mount-SPContentDatabase “<content database name restored in previous step>” -DatabaseServer “<Test / DEV SQL Server>” –WebApplication <web application URL>

Press Enter:

Using the SharePoint 2013 Management Shell mount the restored Project Web App database to the web application.

Type the following command:

Mount-SPProjectDatabase -Name “Name of the restored Project Web App database to mount” –WebApplication “Web Application ULR that the Project Web App database will mount to” –DatabaseServer “Test / Dev SQL Server where the database was restored”

Press Enter:

Now using the SharePoint 2013 Management Shell provision the PWA site collection in the web application where the database was just attached to and using the Project Web App database that was restored previously. Please note, use the same PWA path name used in Production. For example if the instance is called /PWA in Production, use /PWA in the command below on the Test / Dev environment.

Type the following command:

Mount-SPProjectWebInstance –DatabaseName “Name of the restored Project Web App database to mount” –SiteCollection “web application URL + PWA path” –DatabaseServer “Test / Dev SQL Server where the database was restored”

Press Enter:

You can check the provisioning status of the PWA site using PowerShell or in Central admin in the Project Server Service Application to check that the PWA site has been created:

Type the following:

Get-SPProjectWebInstance –URL <PWA URL> | Select ProvisioningStatus

Or in Central Admin:


Post Provisioning

The Project Sites will need to be relinked using the “Bulk Update Connected SharePoint Sites” functionality in Central Admin on the newly provisioned Test / Dev PWA site.

The Project Server Cube settings will need to be updated – update the SQL AS server / cube name.

Any Excel services reports will need to be updated to use the ODC files from the Test / Dev environment as they will currently point to the Production ODC files. This is done by opening the Excel reports in Excel, changing the ODC file then saving the file back to the library.

Wednesday 6 July 2016

SharePoint 2013 Certificate Error Causes Performance Issues

Whilst working with a SharePoint 2013 environment I experienced slow page load times and poor search performance.  After initial page loads performance was fine for several minutes before the performance issue returned.

Opening the Application log within Event Viewer showed the following critical error with the text

“A certificate validation operation took 30015.2428 milliseconds and has exceeded the execution time threshold.  If this continues to occur, it may represent a configuration issue.  Please see http://go.microsoft.com/fwlink/?LinkId=246987 for more details.”

The fix for the problem is to export the SharePoint Root Authority certificate using PowerShell and import it into the Trusted Root Certificate store.  Open the SharePoint 2013 Management Shell as an administrator.

$SProotCert = (Get-SPCertificateAuthority).RootCertificate
$SProotCert.Export(“Cer”) | Set-Content C:\Test\SProotCert.cer –Encoding Byte

Open the Certificates MMC by opening a Run command and type MMC.  Choose File -> Add/Remove Snap-in.  Select the Certificates Snap-in and click Add.  On the next screen select Computer account and click Next followed by Local computer and Ok.



Right-click on Trusted Root Certificates and choose All Tasks -> Import



Complete the wizard by loading the certificate you exported using PowerShell.  Repeat the process on all SharePoint servers experiencing the issue.

These steps fixed the error on most of our SharePoint servers, but it remained on two.  In order to fix the error on the two remaining servers I configured proxy access through Internet Explorer, then from an elevated command prompt ran “netsh winhttp import proxy source=ie”  This configures Windows to use the IE proxy configuration as a default.  The servers were then able to access the internet and verify the certificates.

Thursday 2 June 2016

Re-Create (Generate) SharePoint Root Authority "local" certificate

If your are looking to re-create (re-generate) your SharePoint Root Authority "local" certificate, here are the commands to do so...

I accidentally deleted mine, so I exported from other farm members

To Export:
-------------
$rootCert = (Get-SPCertificateAuthority).RootCertificate
$rootCert.Export("Cert") | Set-Content C:\Temp\FarmRoot.cer -Encoding byte

To Import:
-------------
$rootCert = Get-PfxCertificate C:\Temp\FarmRoot.cer
New-SPTrustedRootAuthority  -Certificate $rootCert