Hot answers tagged

13

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


7

First, you can change the O365 landing page, but you can't specify a URL for the new landing page, it's a dropdown menu. See https://blogs.office.com/2014/09/18/new-office-365-home-page-fast-access-services/ for details. Second, this setting is a per-user one. An admin cannot change this setting for all or specific users at this time. As it's said in ...


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


4

Probably it occurs since you are using App-only policy type for authorization . According to App authorization policy types in SharePoint 2013: App-only policy—When the app-only policy is used, SharePoint checks only the permissions of the app principal. Authorization check succeeds only if the current app has sufficient permissions to perform the ...


4

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


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


4

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


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

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

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

As you said you can use the command Move-SPSite on more site collection. Select the site collection (by matching the url) and then move them. Get-SPSite -Limit All | Where-Object {$_.Url -match "mySiteName" -or $_.Url -march "mySiteName1" } | Move-SPSite -DestinationDatabase ContentDb2 To create a new content DB, you can use New-SPContentDatabase ...


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.


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


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


2

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.


2

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


2

This is expected behavior because.. You make it hidden through the content type page. Now when everything is working fine you decide to change default value of field. For this, you go to, list setting and then that particular column. If you look at the window where you change default value. we have one section "Require that this column contains ...


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.


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

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

My mantra is use a structure like that for publishing type sites, where it is all about information you are trying to display publicly for the users of the company. There generally isn't a ton of content there, it is things like displaying company news, IT Service catalogs, things like that. Then I have site collections for each of the departments for ...


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

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

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

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

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


2

You can use the powershell for it #Get the Web $Web= Get-SPWeb "http://your-sharepoint-site.com" #Set the Title & Description $Web.Title = "Marketing Portal" #Update the changes $web.Update() http://www.sharepointdiary.com/2013/02/change-title-description-and-icon-with-powershell.html Check this video as well. ...


2

After setting the title of a site collection (title of the root web site in the site collection) in the site settings, you should get a new reference to the site, and then query the Title property: $site = Get-SPSite http://YourSharePointSite $site.RootWeb.Title Simply using a $site reference you got before renaming the site will return the original ...


2

Something like Get-SPSite -WebApplication http://sharepoint -Limit All should do the trick.


2

A no-access lock is applied to the site collection to prevent users from altering data within the site collection while the move is taking place. Reference : https://technet.microsoft.com/en-us/library/ff607915.aspx



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