0

I have 2 Site collections. One site collection is for active sub-sites and the other one is for sub-sites that can be archived.

I have created a powershell scheduled task to export sub-sites from the active site collection, and import to the archive site collection. I am doing this by using these commands:

Export

Export-SPWeb -Identity $web -Path ($ExportPath + "\" + $web.Title + ".cmp") -IncludeVersions All -IncludeUserSecurity -NoFileCompression  -ErrorVariable ProcessError;

Import

Import-SPWeb -Identity $newWebUrl -Path $ImportDirectory -IncludeUserSecurity -NoFileCompression -ErrorVariable ProcessError; 

A lot of times this works perfectly fine, but some timeS I get a failure on Import. The exception says this: import-spweb the date time represented by the string is out of range

I thought that this might have something to do with the regional settings, but they are equal on both site collections.

Anybody here thas has experienced the same issue, and have some tips for me ?

  • You mention that you checked the site collection regional settings. Did you check the regional settings of the sub-sites as well? they have their own settings... – dinos.kon Oct 10 '16 at 12:14
  • Yes, but I create an empty web on the archive site before importing, so, it will get the settings of the imported site. – Ilyas Oct 10 '16 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.