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-SPWeb -Identity $web -Path ($ExportPath + "\" + $web.Title + ".cmp") -IncludeVersions All -IncludeUserSecurity -NoFileCompression -ErrorVariable ProcessError;
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 ?