Changing Site Collection URL
Can I change the URL for a Site collection in a Host Named Site Collection setup using PowerShell commands? I will be using Kerberos authentication.
Thanks
MP
Hi MP,
Please perform the steps below:
1. Execute the command below:
Set-SPSite -Identity "http://oldhost" -Url "http://newhost"
2. Start a crawl (incremental is enough).
3. Update the DNS entries.
Regards,
Rebecca Tu
TechNet Community Support
Similar Messages
-
How to identify which is rootsite/webapplication url and which are site collection url ?
How to identify which is rootsite/webapplication url and which are site collection url underneath of web application using powershell script in following code?
# Get site objects
$webapplication = Get-SPWebApplication $siteUrl
# Walk through each site in the site collection
foreach($site in $webapplication.Sites)
foreach($subWeb in $site.AllWebs)
$_ = AddLevel123($subWeb.Url)Hi,
Hope you wanted to know which API is Site collection (SPSite) and Sub site(SPWeb)
$webapplication.Sites = Site Collection (SPSite)
and $site.AllWebs = Subsite (SPWeb)
and see these links - to get webApplication URL
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/e223b607-ab35-454a-a050-1db3005687e5/spwebapplication-url?forum=sharepointdevelopmentlegacy
SPSite Url - SPSite.Url (http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spsite.url.aspx)
SPweb URl - SPWeb.URL (http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spweb.url.aspx)
http://social.technet.microsoft.com/Forums/sharepoint/en-US/b4dfb645-69f4-4abd-947c-64ca42af3a26/script-to-get-list-of-sites-and-subsites
Hope this helps!
MCITP: SharePoint 2010 Administrator
MCTS - MOSS 2007 Configuring, .NET 2.0
| SharePoint Architect | Evangelist |
http://www.sharepointdeveloper.in/
http://ramakrishnaraja.blogspot.com/ -
People Picker in Central Administration on change Site Collection Administrator page.
Hi there
We are coming to the end of our rope here.
We have a problem where the people picker is not working in Central Administration, particularly the change Site Collection administrator page. It simply does nothing but hang the page, it doesn't even give the red squigglies. The search dialogue boxes also
hangs. It works in other parts of Central Administration.
The environment has 2 domains with one way trust between them and the peoplepicker-searchadforest attribute is set.
Any suggestions?Hi Chad,
Did this issue only happen to the "_admin/owners.aspx" page for your Central Administration site?
Please compare the peoplepicker-searchadforest attribute for your Central Administration web applicaiton with other working web application, see if they are the same ( iisreset may need for your Central Administration ).
Also check
ULS log for more related error message (also try others may like "developer dashboard","fiddler", ect.) recoreded when this issue occurs.
Thanks
Daniel Yang
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Feature receiver, change site collection Search Center
Hi, in a Feature Event Receiver I am changing the Search Center of the site collection but it is not taking effect. Does anyone see any mistake or reason for that? thanks
public override void FeatureActivated(SPFeatureReceiverProperties properties)
try
SPWeb web = properties.Feature.Parent as SPWeb;
if (web != null)
SPSecurity.RunWithElevatedPrivileges(delegate()
using (SPSite site = new SPSite(web.Url))
using (SPWeb webElevated = site.OpenWeb())
webElevated.AllProperties["SRCH_SB_SET_WEB"] = string.Format(
"{\"Inherit\":false,\"ResultsPageAddress\":{0},\"ShowNavigation\":false}",
SPUrlUtility.CombineUrl(SPContext.Current.Site.Url, "/search/Pages/results.aspx")
webElevated.AllProperties["SRCH_ENH_FTR_URL_WEB"] = SPUrlUtility.CombineUrl(SPContext.Current.Site.Url, "/search");
webElevated.Update();
catch (Exception exception)
LogWriter.WriteException(exception, LogCategories.Components, this.GetType().ToString());
}Hi,
In my test environment, an exception(Input string was not in a correct format.) occurred at this line when I ran your code.
webElevated.AllProperties["SRCH_SB_SET_WEB"] = string.Format("{\"Inherit\":false,\"ResultsPageAddress\":{0},\"ShowNavigation\":false}",SPUrlUtility.CombineUrl(SPContext.Current.Site.Url, "/search/Pages/results.aspx"));
Please modify it as below:
webElevated.AllProperties["SRCH_SB_SET_WEB"] = "{"+string.Format("\"Inherit\":false,\"ResultsPageAddress\":{0},\"ShowNavigation\":false",SPUrlUtility.CombineUrl(SPContext.Current.Site.Url, "/search/Pages/results.aspx"))+"}";
If the issue still exists, I suggest you debug the code to get more information.
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Dennis Guo
TechNet Community Support -
In my environment, I have one web application, inside which for four different region, we have 4 different site collection. Now head of the company wants, when he logs in , he should get the display of all the four regions urls, and the one which he selects,
should be redirected.
Like, suppose I have a web application named as www.abc.com
Under which I have www.abc.cm/sites/1 and
www.abc.com/sites/2 and so forth.
Now when head of the company access this url www.abc.com , he should get the display to select any one of the, url and should be redirected.
Please suggest how to achieve this.You have multiple options.
1. You can create a links web part and add the links manually.(As there are only 4 sites)
2. You can automate by using SharePoint designer.
http://michael.wilcox.net/2007/10/12/show-all-subsites-in-a-webpart/
3. Download free web part available here.
http://sharepoint247.com/sharepoint2010/sharepoint-2010-subsites-webpart/
Bala -
How to use Site collection url in feature xml
Hello Experts,
I think i am asking a very simple question but this question has realy desturbed me.
I want to deploy 2 script files using modules in style library.
here is elements.xml file of module.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Scripts" Url="Style Library">
<File Path="Scripts\jquery-1.3.2.min.js" Url="jquery-1.3.2.min.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
<File Path="Scripts\splitlinks.js" Url="splitlinks.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE"/>
</Module>
</Elements>
but when i activate the feature at root site collection then these files are deployed .. no probulem.
but when i activate the feature on some other site collection like /sites/test then files should go to /sites/test/Style Library
but it is not going there !!
this is my requirement please help
MukeshHi,
Hi,
Add the Path attribute to the following xml and verify again
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Scripts" Url="Style Library/Scripts" Path="Style Library">
<File Path="Scripts\jquery-1.3.2.min.js" Url="jquery-1.3.2.min.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
<File Path="Scripts\splitlinks.js" Url="splitlinks.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE"/>
</Module>
</Elements>
Please mark it answered, if your problem resolved. -
Get site collection url, site url and list url from a full uri?
If I have incoming: only URI's of the format http://a.b.c/d/e/f/g/h/i/j/k/l/m/n/o/p.docx
(And these are coming from multiple farms and multiple site collections) (and i have a web api on some remote server) (and have all the authentication details)
And I want to query just the single the item via csom : check one column and if value="yes" then download the doc:
a. how do i get the absolute site url out of it for " clientcontext ctx = new clientcontext(THISURL) "
b. how do i then get the list uri out of it to push a caml query to to then retrieve it
I could :
a. strip off the filename, that is the easy part :)
b. I could paste "/_api/contextinfo" behind it and POST it first as a httprequest. Then first get the site and web url and later on
find a way to find the list url (which is probably the first item behind the fullWebUrl), but it seems weird to mix this in the mix
Basically im looking for something that tells me what is what in http://a.b.c/d/e/f/g/h/i/j/k/l/m/n/o/p.docxSorry, GetList is only available in the O365 version of Microsoft.SharePoint.Client. If you could test for a root site collection and if there is not one then take the scheme ... + Uri.segments[0] and then get the context. After that you can use
the GetFileByServerRelativeUrl. The following demonstrates this.
public static void GetFileList()
string fileUrl = "http://basesmc15/teamonesubone/teamsubonesubone/Shared%20Documents/folderholder/newauthor6.pdf";
Uri fileUri = new Uri(fileUrl);
Uri webUrl;
ClientContext rootContext = new ClientContext(fileUri.Scheme + Uri.SchemeDelimiter + fileUri.Host);
webUrl = Web.WebUrlFromPageUrlDirect(rootContext, fileUri);
ClientContext subContext = new ClientContext(webUrl.ToString());
File file = subContext.Web.GetFileByServerRelativeUrl(fileUri.AbsolutePath);
List list = file.ListItemAllFields.ParentList;
subContext.Load(list);
subContext.ExecuteQuery();
Blog | SharePoint Field Notes Dev Tools |
SPFastDeploy | SPRemoteAPIExplorer -
Changing site collections logos across all site collections
HI All,
I need to change the logo across all site collections, which are around 300-400, so don't intend to do this manually.
My question is, will simply replacing the current logo in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE....
with the logo I want to change to, and naming it exactly the same as the current logo, not achieve this?
I have searched online and people run PS to achieve this, but in my head the above seems to be work, please correct me?
ThanksI completely agree with Alex and not suggest to touch/change root folder. Initially it might looks easy but it may create issue.
My option is to BRAND the sites. Master page branding is not a new concept and it mainly use for unanimous look and feel
Look at below links which will help you to explore about branding
SharePoint Branding 101:
Branding Master Pages
SITE LOGO AND CUSTOM SHAREPOINT MASTER PAGE
https://www.youtube.com/watch?v=BX4yJA95FUU
Hope it will help
Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply. -
Hello,
I want to move an entire site collection from an old SharePoint 2010 farm to a new SharePoint 2013 farm. But there are a few requirements:
- The old SP2010 site collection contains multiple SPD Workflows and OOTB Workflows.
- URLs must be changes as the example:
Source Site Collection URL: http://OldWebApp.SP2010.com/sites/OldSiteCollection
Destination Site Collection URL shall be: http://NewWebApp.SP2013.com/projects/NewSiteCollection
- There are no custom solutions nor web parts.
How to accomplis this successfully ?
My steps would be:
1) Copying the content database from SP2010 SQL to the SP2013 SQL via: Copy-only backup feature, or the traditional Backup & Restore.
2) I have already the Web Application on the new SP2013 ready, So, I will just need to create the destination site collection in the SP2013 environment with the new desired URL: (http:\\NewWebApp.SP2013.com\projects\NewSiteCollection).
3) Remove the newly created Content Database of the new site collection in the destination environment.
4) Test-SPContentDatabase -name Old_Content_DB -webapplication http://NewWebApp.SP2013.com > C:\Issues.txt
My worry is that the SP2010 Web Application is Classic-based and I cannot change the entire Web Application to Claims-based as it hosts other running site collections !
Equally, My other worry is that the SP2013 Web Application is Claims-based and I cannot change the entire Web Application to Classic-based as it hosts other running site collections !
First-Question=> I cannot run Convert-SPWebApplication as I don't want to impact the entire source nor destination web applications - How to resolve this?
5) Mount-SPContentDatabase "Old_Content_DB" -DatabaseServer "DBServer" -WebApplication http://NewWebApp.SP2013.com
Second-Question=> As I mentioned above that my requirement is to migrate this old SP2010 site collaction to a totally new URL in SP 2013. My concern is that after completing step-5, the site
collection will overwrite the root new web application and it gets placed on: (http://NewWebApp.SP2013.com) ! I want it to be: (http://NewWebApp.SP2013.com/projects/NewSiteCollection) ? How to do this trick?
Third-Question=> Will all the SPD Workflows & the OOTB Workflows work correctly after the entire site collection has been moved from SP2010 to SP2013? I am asking this because I seen this:
(http://blogs.msdn.com/b/chandru/archive/2013/04/14/upgrading-spd-2010-workflows-to-spd-2013-workflows.aspx), and I got scared. What do you think ?
Could you please help me out in my three questions ?Following are the steps:
Take the backup of the content database in SP 2010.
Create a classic based web application in SP 2013 using PowerShell.
New-SPWebApplication -Name "TestApplication" -ApplicationPool "TestApplicationAppPool" -AuthenticationMethod "NTLM" -ApplicationPoolAc
Create a content database in the web application created above.
Mount the database
Mount-SPContentDatabase WSS_Content_100 -DatabaseServer SQL2012Demo -WebApplication http://sp2013demo:100
Now convert the web application to use claims authentication:
Convert-SPWebApplication -Identity "http://sp2013demo:100" -To Claims –RetainPermissions -Force
Finally, migrate the users to use claims identity:
$w = Get-SPWebApplication "http://sp2013demo:100"
$w.MigrateUsers($True)
See these links for more information:
http://www.sharepointnadeem.com/2013/12/sharepoint-2013-upgrade-from-sharepoint.html
http://www.sharepointnadeem.com/2014/01/upgrade-from-sharepoint-2010-classic.html
Blog | SharePoint Learnings CodePlex Tools |
Export Version History To Excel |
Autocomplete Lookup Field -
Search is not working for only one site collection sharepoint 2010 production environment
did full crawling but it could not crawled particular this only site collection somehow.
when i search under Crawl log, it doesnt appear and throws message like
there are no urls in the system that match your request.
you can see following screenshot,
Thanks
Deepak patelHi Deepak,
Is this site collection url (e.g. FQDN url, or host named site collection url) different from other site collection?
If yes, please add the host named site collection in content source.
If not, and this site collection url are the same type/format with other site collection, please "reset index" if possible, and start a full crawl, let us know your resutls.
If issue still persists, please perform a query in search box, see if there is any related useful information from ULS log.
Thanks,
Daniel Yang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you
have feedback for TechNet Subscriber Support, contact [email protected]
Daniel Yang
TechNet Community Support -
Script to bulk assign 'My Site collection' secondary administrators
Hi
Staff in my company have already logged in and created their own My Sites and when they did this it set themselves as the primary administrator but left the secondary administrator blank. I want to add spadmin to the secondary administrator role.
I know you can set the secondary My Site administrators using
Set -SPSite -identity https://my.company.org.uk/personal/jamesv -secondaryowneralias DOMAIN\spadmin
Could someone please help me put this into a loop which would cycle through all of the personal sites in that web application and then set spadmin as secondary administrator for all.
Id like to learn more about Powershell but not really sure where to look, what courses to do.. if anyone knows of any please also let me know.
Many Thanks
JamesChange site collection administrators for all site collections
Get-SPWebApplication "http://intranet.crescent.com" | Get-SPSite -Limit All | ForEach-Object { Set-SPSite $_ -OwnerAlias "<domain\user>" -SecondaryOwnerAlias "<domain\user>" }
Read more: http://www.sharepointdiary.com/2013/01/change-site-collection-primary-secondary-administrators.html#ixzz3AyBN7Taj
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
2013 SP Site Collection and Farm Admin permissions and cannot access site
I am Farm Admin and Site Collection admin on my 2013 SP server and CAN access Central Admin, but CANNOT open the site without being promted for user name and password. When I enter the user name and password they are not accepted.
This is on my production server. I have NO PROBLEMs with the staging server. The 2 are set up exactly the same.
Any suggestions?Discussion
Farm Administrators are not automatically able to access site collections. They can however add themselves to the site collection administrators group. Additional detail:
Permissions for site collection administrators - scroll down to the
SharePoint farm administrators section (midway down) and look for the
Note.
Resolution
Add your farm administrators account to the site collection administrators group. You can do this two ways:
Go: Central administration > Application Management > Site Collections > Change site collection administrators
Go: [your site collection] > Site Settings > Users and Permissions > Site collection administrators. -
Using Rename() method to change the Url of path based site collection
Hello All,
Is it correct to use
SPSite.Rename() method for changing the url of path based site collection(except the root)?
For example:
Old Site Url: http://portal.contoso.net/sites/HR
New Site Url: http://portal.contoso.net/sites/HROLD
It is working in SharePoint 2013 test environment, but I will be happy to receive some feedback from you about this.
Ivan Yankulov
SharePoint Admin/Consultant
http://spyankulov.blogspot.com/
This post is my own opinion and does not necessarily reflect the opinion or view of MicrosoftHi Lvan,
Yes, the server object model SPSite.Rename() method works on an SPSite object to change the URL of a site collection which is host named or path based.
Best Regards,
Eric
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Home page URL for a new site collection
Sorry for the kind of stupid question. I created a new site collection with Site Management menus. The home page has the URL like http://devtfs12/sites/corporate/_layouts/15/start.aspx#/ I expected that it should look like http://sharepoint.firm.lan/sites/corporate/SitePages/Home.aspx
e.g without "_layouts/15/start.aspx#" is there a way to change it? Is it possible to set up some sort of redirection so that http://sharepoint.firm.lan redirects to http://devtfs12/sites/corporate/_layouts/15/start.aspx#/ Thanks!Hi,
You are noticing the URL with _layouts/15/start.aspx because the new feature Minimal Download Strategy is activated on your site.
To know more on how it works you can refer the below links
http://www.wictorwilen.se/sharepoint-2013---introduction-to-the-minimal-download-strategy-mds
http://www.hezser.de/blog/archive/2012/08/18/what-is-the-_layouts15start-aspx-in-sharepoint-2013.aspx
If you don't want _layouts/15/start.aspx to be a part of your URL you need to deactivate Minimal Download Strategy feature available under Site Actions -> Manager Site Features
Note :Minimal Download Strategy is a new framework which is been written to increase the performance of the SharePoint site.
Also, with SharePoint 2013, you can have Managed Metadata Navigation option. For more information ,
https://support.office.com/en-nz/article/Enable-managed-navigation-for-a-site-in-SharePoint-49a067dc-77d2-455d-9e77-250ec7cc0a6d
Hope it helps!
Thanks,
Avni Bhatt
If this helped you resolve your issue, please mark it Answered -
Alternate CSS URL - Error when mapping to another site collection
I have created a .css file which I have attached on the root Site Collection (https://intranet.domain.com.au) using Site Settings> Master Page> Alternate CSS URL> Specify a CSS... and I have attached
my file. So, that all works fine.
I have then tried to attach this CSS file on another site collection - say
https://intranet.domain.com.au/sites/Site - but when I browse to this site, I get IE saying
"Only Secure Content is Displayed".
I did find a TechNet article saying to change browser settings in Security> Trusted Sites> Custom Level> Display Mixed Content> Enable - but this didn't seem to make any difference.
I would prefer to map just the one CSS file so that when any changes are made, it replicates to this site collection.
Any pointers?Hi,
If you would like to apply one CSS file to multiple sites, here are two methods you could use:
1.
Place the css file in layout folder, and apply it in master page
http://sharepoint.stackexchange.com/questions/81372/alternate-css-url-point-to-layouts-15-folder
2.
Place the css file in layout folder, and create a solution with control element
http://sharepoint.stackexchange.com/questions/75480/what-is-the-proper-way-to-add-custom-css-javascript-sharepoint-2013-site
For more information:
http://www.ashokraja.me/post/Refer-Scripts-and-CSS-Style-Sheet-in-SharePoint-2013-Visual-Web-Part-and-Master-Page.aspx
Regards,
Rebecca Tu
TechNet Community Support
Maybe you are looking for
-
What are the major changes in BI -7
Hi experts, can any one send me document for major changes in BI -7
-
Download all attachments as a zip file
Hi, I want to download all files as a zip file from the database using c#.net visual webpart.
-
Xi-Fi Fatality Rear channels appear in the front chann
?My fron speakers are some how using the rear channels as well when I test them, and it's apparent that the rear speakers are not being used save for quiet feedback. This problem just arose when I noticed a lack in rear noise, and is unsure as to wha
-
Firmware error how my nano is'nt responing
my ipod wasnt updateding on itunes so i tried restroing it but it told my that there was firmware error and now it will not turn on.Can some please help me!!
-
IPhoto not recognizing iPhone 5s
Photos on my iPhone 5s are not being imported to iPhoto. Device seemingly is not recognized.