Hot answers tagged

15

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


14

The link is hidden, and you'd have to type (copy paste it) to reach the delete site option. Navigate to _layouts/15/deleteweb.aspx in the site you want to delete (as owner). In your case it would be https://<domain>.sharepoint.com/sites/RobTest/_layouts/15/deleteweb.aspx


13

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 ...


9

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()) { $...


9

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 ...


8

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 ...


7

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


7

Get the root site url as shown below: var siteUrl = _spPageContextInfo.siteAbsoluteUrl; Get client context using that url as shown below: var context = new SP.ClientContext(siteUrl); list = context.get_web().get_lists().getByTitle(listName); Hope this will help you!


6

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 ...


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

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 ...


6

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 ...


6

This could help var context = new SP.ClientContext.get_current(); var web = context.get_web(); var parentInfo = web.get_parentWeb(); var parentWeb = context.get_site().openWebById(parentInfo.get_id()); context.load(parentInfo); context.load(parentWeb);


6

A site workflow is associated to a site — not to a list, library, or content type Site workflows are not connected to lists or content types and that is the reason you can run site workflows anywhere in the site. Options to trigger Site workflow : Manually From Other workflow From Hyperlink Reference -- Link 1 Link 2


6

If you want to get all the users in your SharePoint site you can use : /_api/web/siteusers? Update: Try using below endpoint to get the Site Members from Members group: _api/Web/SiteGroups/GetByName('SiteName Members')/users To get the specific property for user, you can add $select query as given below: _api/Web/SiteGroups/GetByName('SiteName Members')...


5

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


5

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()


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

My typical stance on this is that each department is it's own site collection. The root site of the site collection is comprised mainly of things the department wants to make available to both internal and external users of the department. The secret department content is stored in team subsites below the root with unique permissions. This gives an ...


5

List workflow is to initiate workflow on any list event. Site workflows release workflow developers from requiring a list item or document item to run workflows against .In short the site workflow is independent of all lists and libraries. Where we use it One use maybe like keep performance indicators, how many users, how much time was spent, those kinds ...


5

The best way to get all items belonging to a content type under a site collection would be to use the Search REST API. Since data will already be indexed, it is the fastest way to get items. You can set the Search API to use the Content Type and Path attributes which will restrict it fetch items accordingly. The endpoint would be as below: /_api/search/...


5

Using @pnp/sp framework, you can get the list of all site collections as below: 1) Add the below import statement: import { sp, SearchQuery, SearchResults} from "@pnp/sp"; 2) After that, you can get the data as below: sp.search(<SearchQuery>{ Querytext: "contentclass:STS_Site", SelectProperties: ["Title", "SPSiteUrl", "WebTemplate"], ...


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

Another option that I have found for restoring a site collection to a different domain to the source domain (and where the source site collection cannot be set up with the site collection admin for the destination domain) is to grant the user account doing the restore access to the web application. $w = get-spwebapplication http://[urltodestinationwebapp] $...


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

Are you creating subsites which shares the masterpage/page layouts from the root site collection? If yes, then see if the master page and layouts are checkedin/published and approved.


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

i think what your refering to is Minimal Download Strategy feature. Its purpose is to speed things up by loading as little resources as possible. Minimal download strategy (MDS) is new web technology used in SharePoint 2013 to save the bandwidth traffic and quick render the pages to the clients. MDS technique use a single .aspx page (/_Layouts/...


4

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) { ...


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