0

Hello I'm trying to make a script to move an ProjectServer site from one farm to another. To to this, first I import the WSS_Content database then try to rename the /PWA site with Copy-SPSite powershell cmdlet. Then I mount the project server databases and do other work.

The problem is when I try to copy the /PWA site to /PWAExample it creates another / site that doesn't work. If I run Test-SPSite http://domain/ it gives me this huge error. The Copy-SPSite http://domain/sites/old -targetUrl http://domain/sites/new works. It dosent work with Copy-SPSite http://domain/PWA -targetUrl http://domain/PWAExample

    test-spsite : SPSiteHealthChecker: System.IO.DirectoryNotFoundException exception thrown in SPSiteHealthChecker.Test():
 <nativehr>0x80070003</nativehr><nativestack></nativestack>
   at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenWebInternal(String bstrUrl, Guid& pguidID, DateTime& pdtTimeCreated, String& pbstrRequestAccessEmail, UInt32& pwebVersion, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrThemedCssFolderUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, Int32& plSiteFlags, Boolean& pbOverwriteMUICultures, Boolean& pbMUIEnabled, String& pbstrAlternateMUICultures, Int32& plSiteSchemaMajorVersion, Int32& plSiteSchemaMinorVersion, Int32& plSiteSchemaBuildVersion, Int32& plSiteSchemaRevisionVersion, Int32& puiVersion, Int16& pnClientTag, Boolean& pfIsEvalSite, Guid& pgSourceSiteId, DateTime& pdtExpirationDate, Guid& pgEvalSiteId, Guid& pguidAppInstanceId, String& pbstrRemoteAppUrl, String& pbstrOAuthAppId, String& pbstrAppDatabaseName, Guid& pgAppDatabaseServerReferenceId, String& pbstrAppDatabaseTargetApplicationId, String& pbstrAppWebDomainId, Int32& plUpgradeFlags, DateTime& pdtReminderDate, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange, UInt64& pmaskDeny)
   at Microsoft.SharePoint.Library.SPRequest.OpenWebInternal(String bstrUrl, Guid& pguidID, DateTime& pdtTimeCreated, String& pbstrRequestAccessEmail, UInt32& pwebVersion, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrThemedCssFolderUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, Int32& plSiteFlags, Boolean& pbOverwriteMUICultures, Boolean& pbMUIEnabled, String& pbstrAlternateMUICultures, Int32& plSiteSchemaMajorVersion, Int32& plSiteSchemaMinorVersion, Int32& plSiteSchemaBuildVersion, Int32& plSiteSchemaRevisionVersion, Int32& puiVersion, Int16& pnClientTag, Boolean& pfIsEvalSite, Guid& pgSourceSiteId, DateTime& pdtExpirationDate, Guid& pgEvalSiteId, Guid& pguidAppInstanceId, String& pbstrRemoteAppUrl, String& pbstrOAuthAppId, String& pbstrAppDatabaseName, Guid& pgAppDatabaseServerReferenceId, String& pbstrAppDatabaseTargetApplicationId, String& pbstrAppWebDomainId, Int32& plUpgradeFlags, DateTime& pdtReminderDate, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange, UInt64& pmaskDeny)
   at Microsoft.SharePoint.SPWeb.InitWebPublic()
   at Microsoft.SharePoint.SPWeb.get_Language()
   at Microsoft.SharePoint.Administration.SiteHealth.SPSiteHealthConflictingContentTypeRule.ProcessWeb(SPWeb spWeb)
   at Microsoft.SharePoint.Administration.SiteHealth.SPSiteHealthRule.ProcessWebs(SPWeb spWeb)
   at Microsoft.SharePoint.Administration.SiteHealth.SPSiteHealthRule.ProcessWebs(Boolean repair)
   at Microsoft.SharePoint.Administration.SiteHealth.SPSiteHealthConflictingContentTypeRule.Test()
   at Microsoft.SharePoint.Administration.SiteHealth.SPSiteHealthChecker.Test(Guid _ruleId, Boolean _repair, Boolean _runAlways, SPLongOperationState longOperation,
String statusFormat)
 SPSite="http://domain"
 ruleId=00000000-0000-0000-0000-000000000000
 repair=False
 CompatibilityLevel=15
At line:1 char:1
+ test-spsite http://domain/
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...PCmdletTestSite:SPCmdletTestSite) [Test-SPSite], SPSiteHealthCheckerException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletTestSite
0

The problem was that /PWA is actualy a managed path. And copy a site collection to new managed path you first have to create it with Explicit inclusion.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.