Hot answers tagged

6

CSOM Using the ClientContext, get your Site object and check its URL SPContext.Current.Site.ServerRelativeUrl : if == "/" JSOM For that you can use the _spPageContextInfo variable. To check if user is in root site collection vs any other site collection, check this variable : _spPageContextInfo.siteServerRelativeUrl : if == "/", then is the absolute ...


5

As Steven stated there is no way to do this OOTB but you can do it with powershell. Get the lists from different Sites: $targetWeb = Get-SPWeb http://sitecollection/site1/ $sourceWeb = Get-SPWeb http://sitecollection/site2/ $targetList = $targetWeb.Lists.item("Target List Name") $sourceList = $sourceWeb.Lists.item("Source List Name") Add the Lookup field ...


4

The users are stored per SiteCollection, so there will no other way as to iterate through all of them.


4

You can detach the content database from central admin and then reattach using the correct SQLCluster Name. You dont need to delete anything. Attach or detach content databases in SharePoint 2013


3

Do not remove the site collection from the database! Just remove it via the GUI (Site settings -> Delete site) or use the PowerShell cmdlet Remove-SPSite (outlined here). This will make sure it is deleted the right way


3

If both primary and secondary owners are set, the only other way to add additional Site Collection admins is to use the New-SPUser command and include the switch parameter -SiteCollectionAdmin. New-SPUser -UserAlias 'Contoso\Jdow' -DisplayName 'Jane Dow' -Web 'http://contoso.com' -SiteCOllectionAdmin


3

things are as simple as you mentioned in your question. Here are the steps. You have to perform the SQL backup of the Content Database from Source Farm Move the back file to destination server(sql) Restore the Database on destination SQL Server now you have two options over here if you overwrite the destination dB while restoring, then no need to attach ...


3

You can use: New-SPSite -Url $url –ContentDatabase $ContentDatabase -Name $WebsiteName –Description $WebsiteDesc -Template $Template -OwnerAlias $PrimaryLogin –OwnerEmail $PrimaryEmail see: https://social.technet.microsoft.com/forums/sharepoint/en-US/89c90032-5be1-4fe6-8546-0114eaf018ca/site-collection-in-a-particular-content-database


3

There are couple of ways to find it. simple one is Go to the view source of the SharePoint page >> Search for "SiteTemplateID" to find site template name SharePoint 2010. USe command Line tool stsadm.exe -o enumallwebs -databasename <content-db-name> > Template.txt Now, Open the template.txt file and check for template Use SharePoint Manager ...


3

For this process to work, the following must be true The destination content database must already exist. The source content database and destination content database must be located on the same instance of SQL Server. The source content database and destination content database must be attached to the same Web application. Steps Add a content database ...


3

Source: http://www.sharepointrelated.com/2015/03/30/change-site-collection-url-sharepoint/ $site = Get-SPSite http://servername/customer/questions $site.Rename("http://servername/customer/generalquestions") And you have more detailed info in http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=573


3

1) Yes. This is possible. The scope of your requirements have not been defined, so if you require anonymous access, I have included links for how to do that. If not, ignore those links. For Anonymous users : You need to first Enable Anonymous Access on the web application in Central Admin (Check out Authentication Providers). You will then need to make some ...


3

Looks like you miss the most important root level site collection. Could you please create the root level site collection on qwe web app. this site should be on "/" path. When you go to Create new site collection, Select "/" in the managed path.


2

Yes, it is possible to get it. You can use REST calls to get the required information. The following code shall help you: I have created respective arraylists to store the subsite, document library and folder information. Once the information is collected in the arraylists we can display it as per out requirement. Get subsites: $.ajax({ url: siteUrl + "...


2

In my opinion, I'd build it for growth off the bat and have each department in a site collection, with a managed path--"sites" is fine http://sharepoint/sites/hr http://sharepoint/sites/finance http://sharepoint/sites/operations With each site collection there will be a site collection specific, generated set of SharePoint groups--Visitors, Members, and ...


2

Publishing Portal maps to "BLANKINTERNETCONTAINER#0" and not "BLANKINTERNET#0", which is specific to subsites. You can verify this or any other site template from the site creation page by using your browser's dev tools and looking at the select option that represents the site you're trying to create:


2

There isn't anything native to do this. We have it included as part of a provisioning commandlet that follows our business logic for quotas and architecture. You could do it like this using SharePoint Online PowerShell module to update existing sites, and just include the Set-SPOUser in your provisioning: $sites = Get-SPOSite -limit all foreach ($site in $...


2

SharePoint adds the number because the name still exists because of the site collection not being completely removed from the content database. If you would try to create a third, it would be called ABC-3 and so on. Changing the title, the site collection will still be named ABC-2 internally. When you remove a site collection from the UI, the site ...


2

Save your site as template manually. Then find the template guid id. Now create your site using CSOM. See more here internal void CreateSite(String targetUrl, String title, String owner, String siteTemplate) { var ctx = new ClientContextWrapper(targetUrl); var tenant = new Tenant(ctx); //Create new site var newsite = new ...


2

if you have both web application properly configured. Make sure both DNS are properly registered. Create Web Applications on http://one port 80 and http://secondwebapp port 80. once 1st web app created it will ask to create the root level site collection. I think, this is where you created 1st root level. Now once 2nd web app created same message will ...


2

First you test your database by running Test-SPContentDatabase -name WSS_Content_DB -webapplication http://sitename If you get errors, solve them. When you have no errors, continue with Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication http://sitename This example mounts an existing database to the sitename web ...


2

You have to Create your Content Type as Content Type Hub after that your Content type will appear in all site collection of your web application for more info about you can refer below links http://www.sharepointpals.com/post/How-to-Use-Content-Type-Hub-in-SharePoint-2013 http://www.c-sharpcorner.com/UploadFile/40e97e/create-content-type-hub-in-sharepoint-...


2

If I understand correctly, there's never been a root-level site collection in your Web app (otherwise, you "/" would not have been an option when creating a new collection, "/sites/" would have been the only-and-default option. So, to delete it, you can simply go to Central Administration, "Applications management", "Delete a site collection", select the ...


2

With PowerShell. Move-SPSite Move-SPSite http://servername/sites/sitename -DestinationDatabase ContentDb2 Be aware that you have to do an IISreset on all the servers in your farm after you move a site collection to a different content database, which means downtime for the end users.


2

I would do this way( i am guessing you are developer). Create a List in SharePoint with all required column( Site collection name, url, Owners, Site template etc)as per your requirement.One special field which will indicate whether this request processed or not( true/false type). Now create PowerShell Script, which will read from List and create the site ...


2

Welcome to the site. What happens when you add site columns to a list or content type is that a copy of that column is taken and added to the list or content type. For this reason, if you were to delete the columns from the list or content type, you would only ever be deleting the copy. Are you using content types in your list? If so, go to your list's ...


2

Use Get-SPDeletedSite "/" to get all the deleted site collections from the root site Check this link below https://technet.microsoft.com/en-us/library/hh286316.aspx


2

I found the reason for the above scenario from the below link, https://technet.microsoft.com/en-us/library/ff607948.aspx Remove-SPSite -Identity "http://sitename" -GradualDelete -Confirm:$False This command actually leaves some mark about the deletion of the Site. But without GradualDelete option, Remove-SPSite completely removes the Site Collection ...


2

I think you are seeing the effect of a known "issue" I asked about here. Basically, when checking for a site existence, SharePoint seem to reference some internal caching mechanism. This seem to be the root cause of a site still begin detected as still "existing". As you can see from the linked discussion, there are actually two different aspects that you ...


2

There are two Publishing features that need to be enabled, one at the site collection level and one at the web (aka site) level. A key concept to understand here is that when you create a site collection, it has what is known as a "Root Web", which is the top site in the site collection. Because it's the top site in the site collection, it has some special ...



Only top voted, non community-wiki answers of a minimum length are eligible