Follow Us:
I was moving a site from production to development today and was welcomed to my new site with the following lovely message from SharePoint:
(The Web application at http://intranetprod/RA could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.)
So, if you have ever moved a calendar from one place to another, either as part of a site move or a list move, you will be greeted by the fact that your calendar overlays no longer work because the URLs to the overlaying calendars are hardcoded into the list view. This calendar had 3 overlays and there are other calendars with more overlays. I am trying to set up an automated restore from production to development, so having lots of broken calendars isn’t great. Fortunately, all you have to do is run a few lines of PowerShell to fix this.
I’ll walk you through the steps, the full code is below.
So, here is the full script. Hope this helps.
1: #Add SharePoint PowerShell SnapIn if not already added
2: if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {
3: Add-PSSnapin "Microsoft.SharePoint.PowerShell"
4: }
5:
6: $web = Get-SPWeb “http://intranetdev”
7: $mainCalendar = $web.Lists["Calendar"]
8: $view = $mainCalendar.Views["Calendar"]
9:
10: $calSettings = $view.CalendarSettings
11: $view.CalendarSettings = $calSettings.Replace("intranetprod", "intranetdev")
12: $view.Update()
That was an awesome life-saver. Saved me tons of time from having to rebuild the entire calendar on the development site. Now I am able to quickly test some things out on the dev web app.
Thanks for posting this! It's a common problem when doing a migration and there aren't many articles out there explaining it.
This excellent post, this has helped us to resolve issue in production. Thanks alot buddy!!
The complementary paper includes over 12 years of research, recent survey results, and CRM turnaround success stories.
Request Download
This 60-second assessment is designed to evaluate your organization's collaboration readiness.
Learn how you rank compared to organizations typically in years 1 to 5 of implementation - and which areas to focus on to improve.
This is a sandbox solution which can be activated per site collection to allow you to easily collect feedback from users into a custom Feedback list.
Whether you are upgrading to SharePoint Online, 2010, 2013 or the latest 2016, this checklist contains everything you need to know for a successful transition.