Tag Info

Hot answers tagged

11

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


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


3

Maybe you're site is still listed as a SPDeletedSite? Get-SPDeletedSite & Remove-SPDeletedSite You may already have used this site name before and deleted it. Check by running the following script: >Get-SPDeletedSite You'll see the site (or sites) listed, like this: WebApplicationId : 009c1289-392b-43a6-8222-146117074738 DatabaseId : ...


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


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

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

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


3

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


2

A Site Collection cannot have a Parent Site Collection, A Site Collection can only have child Sub-Sites. So to answer your questions: 'test.mycompany.net' is not a parent to the other site collections. It didn't inherit because there is no parent-child relationship. Only subsites would be able to inherit the masterpage. In order to 'share' a ...


2

Option 1. SPWeb.GetSubwebsForCurrentUser method SPWeb.GetSubwebsForCurrentUser method gets the subsites beneath the current site of which the current user is a member Since it retrieves only beneath the current site(1 level only), you could use the following method to return all web sites that are contained within the site collection: private static void ...


2

I would recommend to utilize Web.GetSubwebsForCurrentUser method instead Web.Webs property since it returns the security trimmed (the current users has access) list of sub sites. Modified example var objectsToInclude = new Expression<Func<Web, object>>[] { w => w.Title, w => w.Url, w => w.Lists, ...


2

You can try: Configuring a SQL job to backup the content databases - as opposed to SharePoint's backup commandlets or Use a Windows Scheduled Task to run your Powershell commands For the scheduled task I usually have two files: backup.bat - with the commandline below, that executes the second file ...


2

A Site Collection in SharePoint is basically a collection of SharePoint sites that share common features like Content types, Templates, Site columns, permissions, Web Parts etc. Separate Site Collections Unique set of users and permissions Unique and separated content databases are possible, which allow for multiple large (200GB+) sites Unique set of ...


2

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


2

Can you try this: Go to Central administration -> Application Management-> Database -> Manage Content Database. Select the required web application and click on Add Content Database. Give the name to this database. Now restore the site collection to this database using Restore PowerShell Command: Restore-SPSite http://sitename/sites/site_name -Path ...


2

A user specifically given site collection admin access will be able to access anything in the site. If you want to have someone with more or less site collection admin access to everywhere but the one library, you will need to do the following: Remove them as a site collection admin. Add them to the root with Full Control access. Go to the library and ...


2

Maybe you have deleted the site before, and it's lurking around in a dark place? Try this and see what you get... Get-SPDeletedSite & Remove-SPDeletedSite You may already have restored this site before. In that process you also deleted the site first (automatically), which you can find running the command... >Get-SPDeletedSite You'll see the site ...


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


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

1 - The Move-SPSite cmdlet moves the data in the specified site collection from its current content database to the content database specified by the DestinationDatabase parameter. 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. Once the move is complete, the ...


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

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

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.



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