Tag Info

New answers tagged

0

You need to itterate through all the groups in a site collection and get all users in these groups like so: using System; using Microsoft.SharePoint.Client; namespace Microsoft.SDK.SharePointServices.Samples { class RetrieveAllUsersAllGroups { static void Main() { ClientContext clientContext = new ...


2

Use SPWeb.SiteUsers to get all users in the site collection.


0

You can try Managed Metadata fields in this scenario where the admins for Taxonomy are separate set of users with in SharePoint. Let me know if you have any questions.


0

Yes, You need to set the url for the HNSC. Even url comes with the content DB but not accessable. SO follow these steps. Mount-SPContentDatabase -Name -DatabaseServer -WebApplication -confirm:$false Get-SPSite -ContentDatabase | Format-Table -Property Url, ID Set-SPSite -Identity -Url Now test it.


-1

You can use PowerShell to Restore Content Databse Backup Restore-SPSite -Identity <Site collection URL> -Path <Backup file> [-DatabaseServer <Database server name>] [-DatabaseName <Content database name>] [-HostHeader <Host header>] [-Force] [-GradualDelete] [-Verbose] <Site collection URL> - Will be the URL of the ...


2

The list instance was created on the site on which you activated the feature. Your list should be in a web-scoped feature. Site-scoped features are for site scoped things like master pages, content types and web parts. They will not cause web-scoped things like lists to become automatically provisioned on subwebs. This means every subsite you want the ...


0

If the Scope is "Site" it creates only at root site level, change it to "Web" and deploy it. Please deactivate, uninstall and retract completely before you deploy your changes.


3

Similar to the other posts, I recommend a single site collection for customers, and a subsite per customer. As far as sharing columns and such, use the Content Type Hub and load up your content types and throw those in your issues lists. If you don't have a site provisioning process, get one ;) this can handle your CTs and lists for you. Then using search ...


1

As per you requirement, what i understand, you want to create the a site for each customer. I would recommend to create a customer site collections, t his will seprate the customer data from your team. Your url lenght will be short for customer's sites For issue tracking list, as you already have the issue tracking list in the team site then you can ...


3

I depends on many factors. Some of the rules I follow are Create Site Collections - For not related entities (Ex - Departments) Create Site Collection if we are dealing with large amount of data. This will enable us to split Content Database per site collection In all other cases I simply create site based on the organization structure.


0

You can do $site.rootweb.ContentTypes to get all content types. Then for each one, use the SPBuiltInContentTypeId.Contains(ContentTypeId) method (MS reference) to check whether the content type is a built in one. If it is not, it must be a custom created one. Like so: [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") Function ...


2

One workaround is: Enable the Publishing feature at site collection now browse this page sitecolelction/_layouts/15ChangeSiteMasterPage.aspx Now you can change the master page for all subsite.


0

Click on the gear symbol and select the site settings from the drop down. If you see the Site Collection Administration groups with all relevant links as in the image below then it means you are on a site collection. If you see the Site Collection Administration with a single link saying Go to top level site settings as in the image below then you are ...


1

If you have the "bar" as managed path and you are trying to create a subsite under the root site collection ("/") then it will throw the following errors. "bar" cannot be used as a site name. Site names cannot contain certain reserved words and cannot begin with an underscore. Please enter a different name. But if you already created a web under ...


-1

Simple way to get the root site collection from SPContext.Current: // root site – eg. Web App url string rootSiteCollectionURL = SPContext.Current.Web.Site.WebApplication.Sites[0].Url; // site collection url string SiteCollectionURL = SPContext.Current.Web.Site.Url;


0

The answer of auhcms (http://sharepoint.stackexchange.com/a/39606/41946) is correct, but incomplete. As it seemed strange to me that the root site collection would always be the first element in the SPWebApplication.Sites collection I decided to do a quick test. I preformed the following steps: Created a new WebApplication Created a Site collection under ...


2

This error occurs since there is mismatch between Microsoft.Online.SharePoint.Client.Tenant.dll assembly and the Microsoft.SharePoint.Client.dll assembly versions that are referenced in project. Ensure the proper version of Microsoft.Online.SharePoint.Client.Tenant.dll assembly is referenced. For example, for SharePoint Online project the the following ...


3

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


11

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


4

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


1

You can do it using below script $site = Get-SPSite http://siteurl $site.LastContentModifiedDate



Top 50 recent answers are included