Hot answers tagged

13

or simply: $site = Get-SPSite http://YourSharePointSite $site.AllWebs.Count


11

Subsites are incredibly useful in all the following scenarios This site has a different function from the main site. Assuming you are talking about an internal portal, generally you would want your helpdesk and your social committees to have their own subsite each. Because their information will almost never be relevant to each other, and they are both ...


9

How to retrieve sub webs under root web The following REST endpoint https://contoso.sharepoint.com/_api/site/rootWeb/webinfos will return the collection of sub webs (WebInfo objects) under root web How to retrieve sub webs under relative web Assume the following site structure: -- Root | -- Community | -- Feedback Then the ...


7

Yes, absolutely. In 2010+, it's the group NT AUTHORITY\authenticated users Before that, it was "All Authenticated Users"


7

I would assign the site's Visitor group a read-only permission level throughout the site.


6

Yes, sitemanager.aspx looks more SP2007-like, but you cannot specify the default master page because it does not use a master page at all. If you look at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SiteManager.aspx you will see no master page in the Page directive and no ContentPlaceHolders on the page.


6

The Site Definitions are not examined when rendering a page but during provisioning. For a detailed explanation of the rendering see the link provided by @Moss Farmer, but let me give a shorter version here. Application pages (from _layouts) Application pages are just ordinary ASP.NET pages which are rendered from a virtual directory. Site pages The site ...


6

Expanding on what others have written above, in SharePoint 2010 and 2013 it depends on the type of authentication you've setup your Web Application with. For classic mode you only have windows authentication so NT AUTHORITY\authenticated users will grant access to anyone that can authenticate with a valid windows credential. For claims mode you'll have at ...


6

From a technical point they're exactly the same. The only difference is the way users think of site collections beneath each of them. So it's common to use "/teams/" for site collections for individual teams and "/sites/" for everything else (in SharePoint Online, On-Premises often create their own) "/sites/" and "/teams/" is what is called managed paths in ...


5

Web web = clientContext.Web; var subWebInfo = new WebCreationInformation { Description = "", Language = 1033, Title = "Sub Site", Url = "subsite", UseSamePermissionsAsParentSite = true, WebTemplate = "STS#0" }; Web subWeb = web.Webs.Add(subWebInfo); clientContext.Load(subWeb); clientContext.ExecuteQuery(); Works also without ...


5

if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"} if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } $sites = Get-SPSite <SiteCollectionUrl> $noOfWebs = 0 foreach ($web in $sites.AllWebs) { $noOfWebs++ } If ($sites ...


5

Check your web application user policy and see if builtin\administrators have full control.


5

If you want to have a specific user be able to delete users posts then you will need to give them Manage Social Data permissions on your User Profile Service application. Go to Service Applications - highlight the user profile service and click Administrators from the ribbon. Add a user account and select Manage Social Data from the permissions list. The ...


5

Ok, consider we have this environment: We have farm-level WSP file (this also could be sandboxed in this situation, but for clarity, let's consider it is a farm one). This WSP contains some lists and libraries definitions/instances, and also some visual webparts. Also, WSP file contains at least one feature in it. This WSP is added into your farm, deployed ...


5

You can find the correct template and use it in code like this (templateName is the title of your saved template, locale is the locale ID of the template): // Find correct template SPWebTemplateCollection templates = SPContext.Current.Site.GetWebTemplates(Convert.ToUInt32(locale)); // or GetAvailableWebTemplates or GetCustomWebTemplates SPWebTemplate ...


4

I just created a fresh site collection with a standard team site template (that has a Shared Documents library by default ). I used the following code and got the results listed below: $web = Get-SPWeb http://spdevsp01/sites/test $lists = $web.lists foreach ($list in $lists) { if ( $list.BaseType -eq 'DocumentLibrary') { write-host $list.title ...


4

Open the feature that includes the project item and expand the files node on the project item to verify the files that are included with the item. I suspect that your elements file will not be displayed. You need open the properties for the elements file (open the file and click F4), and make sure that the type on the file is set to "ElementManifest".


4

I would consider looking at Web Templates - see Anders Rask's slide deck & code from #SPSUK http://sites.wizdim.com/andersrask/sharepoint-2010/slide-decks-and-demo-code-from-my-sharepoint-saturday-uk-session/ In essence, save as a site template, import to Visual Studio and package up with the appropriate elements (cutting out elements you don't really ...


4

You can set the site collection to Read-Only from CA, so it is possible that someone did this: CA > Application Management > Site Collections section > Configure Quotas and Locks > Select site collection > check if it is set to Read Only I think its default that site collections are set to read only during backup, so maybe you have a failed backup ...


4

You can try something like this in powershell. $allSiteFeatures = Get-SPFeature | Where-Object { $_.Scope -eq "Site" } $activeFeatures = Get-SPFeature -Site "http://sitecollectionUrl" $allSiteFeatures | ForEach-Object { $active = $false foreach($feature in $activeFeatures) { if($feature.Id.ToString() -eq $_.Id.ToString()) { ...


4

With the SharePoint 2013 tools they removed the Site Definition project template, but added Site Definition as a project item. So you have to create an empty SharePoint 2013 Project and the add a new item of type Site Definition


4

I'd make separate site collections per vendor. Permissions will be easier to manage and you don't risk exposing information to other vendors by accident. Bog it down is rather vague. It might make things slower for other users if one vendor is storing a lot of data.


4

Using the following code, within the SharePoint Management Shell, you can get the count of Web Applications in the Farm, Site Collections in Web Application, Sites in Site Collection. Write-Host "Web Applications in Farm" $WebApplications = Get-SPWebApplication $WebApplications | Measure-Object | Format-List Count ForEach($WebApplication in ...


3

Use SPWeb.Language Property: if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null) { Add-PsSnapin Microsoft.SharePoint.PowerShell } $SiteUrl = "http://contoso.intranet.com/" $site = Get-SPSite $SiteUrl write-host $site.RootWeb.Language $site.Dispose()


3

I'd like to quote myself on this reply I gave to a similar question What are the factors that govern the dicission of whether to choose publishing or collaboration (teamsite) template for new site collection? Site Pages (from the team site) contain Wiki Pages. Pages (from the publishing site features) contains Article pages and similar pages, that can be ...


3

Looks like, Site is still in SharePoint Admin Bin.You should this. Use powershell to create site collection Or Run this command Get-SPDeletedSiteenter link description here and if you get all the sites you are having issue then Run Remove-SPDeletedSite -Identity Manually run the Gradual Site Delete timer job from central admin. after this try to ...


3

Twitter provides rich devloper API's. You can check that here and create your own. Else you can use the one twitter provides. Something like <a class="twitter-timeline" href="https://twitter.com/twitterdev" data-widget-id="YOUR-WIDGET-ID-HERE"> Tweets by @twitterdev </a> <script type="text/javascript"> window.twttr = (function (d, s, id) { ...


3

You can download few of the existing FREE Twitter Web Parts Free Sharepoint Twitter Web Part Search for Twitter Feed Twitter Web Part


3

In order to copy to site in same site collection you need to add a new content Database in that web application, otheirwise it will throw the error. here are the steps: Create a new Content Database in the web application Take the Backup of the Site sites collection using Backup-spsite. Now restore the site collection and using the database paramter to ...



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