Hot answers tagged

16 votes
Accepted

No. of subsites in a site collection?

or simply: $site = Get-SPSite http://YourSharePointSite $site.AllWebs.Count
  • 3,172
14 votes
Accepted

How to delete O365 Team Sites

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 ...
  • 25.4k
13 votes
Accepted

REST API - Retrieve Group Members

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/...
  • 30.5k
7 votes
Accepted

How to pull data from root level site and display in subsite using JSOM?

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....
6 votes
Accepted

Determining size in MBs and user count for 'one particular' site collection

This line will return the size of all the site collection in MB: Get-SPSite | select url, @{label="Size in MB";Expression={$_.usage.storage/1MB}} | Sort-Object -Descending -Property "Size in MB" | ...
  • 2,863
6 votes

How to pull data from root level site and display in subsite using JSOM?

This could help var context = new SP.ClientContext.get_current(); var web = context.get_web(); var parentInfo = web.get_parentWeb(); var parentWeb = context....
6 votes

Difference between list workflow and site workflow

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 ...
6 votes
Accepted

Rest API to pull all list items that uses a unique Content Type under a specific URL

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 ...
  • 30.5k
5 votes
Accepted

Language code of a site collection

Use SPWeb.Language Property: if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null) { Add-PsSnapin Microsoft.SharePoint.PowerShell } $SiteUrl = "http://...
5 votes

No. of subsites in a site collection?

if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"} if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "...
  • 25.4k
5 votes
Accepted

What to do about sharing across departments, roles or people in SharePoint

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

Difference between list workflow and site workflow

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 ...
  • 2,137
5 votes

SPFX and pnp/sp : How to get all sites

Using @pnp/sp framework, you can get the list of all site collections as below: Add the below import statement: import { sp, SearchQuery, SearchResults} from "@pnp/sp"; After that, you can ...
  • 30.5k
4 votes

Restore-SPSite : Access Denied

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 ...
  • 4,031
4 votes
Accepted

Copy Site Collection in same Web Application

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 ...
  • 56.8k
4 votes
Accepted

Adding Twitter Feeds on SharePoint 2013

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/...
  • 28.2k
4 votes
Accepted

Site.OpenWeb() VS Site.RootWeb()

If you want to get hold of a subsite using GUID or URL (server-relative or site-relative), OpenWeb() should be used.The SPWeb returned from OpenWeb() should be manually disposed. Also,look this ...
  • 3,083
4 votes
Accepted

Site Collection '500 INTERNAL SERVER ERROR'

Resolving 500 Internal Server Error [ Source ] Go to Central Administration and see if you access. Go to IIS Manager and check you application pools are all running. If not, start your application ...
  • 2,365
4 votes

No. of subsites in a site collection?

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 ...
  • 2,365
4 votes
Accepted

Show Users a list of sites they can access

Taken directly from our SharePoint Online search results web part that shows people what sites and webs they have access to: (contentclass:STS_Site OR contentclass:STS_Web) AND NOT WebTemplate:...
4 votes

Remove unique permissions on all locations on site SharePoint 2013

Try this #Variable for Web URL $WebURL ="Your URL " # Varibale to hold document count $count = 0 #get Web object $Web = Get-SPWeb $WebURL if ( ($web.HasUniqueRoleAssignments) -and ($web....
  • 329
4 votes

/_layouts/15/closeconnection.aspx?signinasanotheruser=true (Sorry, this site hasn't been shared with you.)

i think your URL is different then MSFT recommended. Please use the below mentioned URL then try it. http://testing:10020/_layouts/closeConnection.aspx?loginasanotheruser=true Read more about it ...
  • 56.8k
4 votes

How to pull data from root level site and display in subsite using JSOM?

By using the following code you can get the root web : var clientContext = new SP.ClientContext.get_current(); this.oSite = clientContext.get_site(); this.oWebsite = this.oSite.get_rootWeb(); ...
4 votes

office 365 sharepoint wiki page library not available

You need to activate "Wiki Page Home Page" feature from "Manage Site Features". Navigate to Communication site->Site settings->Manage site features->activate "Wiki Page Home Page" feature:
4 votes

SPFX and pnp/sp : How to get all sites

Do you want all sites in the tenant, or just the sites the user has permissions to? You can use the search API to return a list of webs or site collections the user has access to. https://yourServer/...
4 votes

What is the difference between site collection storage and site storage?

A Site Collection is a container of Sites. (The distinction is clearer for developers as the code objects are named SPSite (for a Site Collection) and SPWeb (for a Site). A Site Collection has a top ...
4 votes

New-PnPSite - Check if site is allready created?

You can use the Get-PnPTenantSite command to check if a site collection exists or not as below: $site = "" Try { Write-Host "Checking, if site already exists..." $site = Get-PnPTenantSite -...
  • 30.5k
4 votes

How to get SharePoint site usage report at individual user level?

Except for the M365 Audit log report, there is no data collected on a per user basis for SharePoint online. The Audit log report collects EVERYTHING about that user's activity, not just in SharePoint, ...
  • 8,787
3 votes

Adding Twitter Feeds on SharePoint 2013

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

Unable to recreate a sharepoint site with a name that was previously used

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 ...
  • 56.8k

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