Tag Info

Hot answers tagged

4

Using a pure Sandboxed solution this is not possible. A sandboxed solution has absolutely no access outside the current site collection, that's the whole point of sandboxed solutions. On-premises If you're solution is developed for on-premises SharePoint where it's "just" politics which require the solution to be Sandboxed. Then there is the possibility of ...


4

To list them, this actually gives you all sites under the path though: Get-SPSite "http://awesome.com/workspaces*" -Limit ALL To delete you should be able to use Get-SPSite "http://awesome.com/workspaces*" -Limit ALL | Remove-SPSite -Confirm:$false You can use Remove-SPContentDatabase -Identity {GUID} to remove a content database


4

No, you can't have different web.config for different site collections, however you maybe be able to add tweaks e.g. HttpModule and HttpHandlers configurations to it depending on your requirements...


3

If your production and development environment is patched to the same version, you can just go to sql management studio and take a backup of the content database, move it the dev environment and restore it using sql management studio, and then use Powershell to mount it to a web application ( Use Test-Spcontentdatabase before this step ): Use the ...


3

I know your original question was about doing a backup and restore of the content DB. But here is another way of doing it using backup and restore. You want to use the flag -UseSqlSnapshot in case users are currently using the prod site. Backup-SPSite -Identity https://urltomyprodsite –Path "c:\backups\myProdSite.bak" -UseSqlSnapshot Copy the backup ...


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


2

You can do it all from C# using the excellent post found here. This example is, I believe, from within a SharePoint app but you can do it similarly from a console app. First you'll need to add a reference to Microsoft.Online.SharePoint.Client.Tenant.dll which you can find here (C:\Program Files\SharePoint Client Components\Assemblies) after installing the ...


2

You will need the SharePoint Client Components SDK for this: using Microsoft.Online.SharePoint.TenantAdministration; using Microsoft.SharePoint.Client; using System; using System.Security; namespace CreateSiteCollections { class Program { static void Main(string[] args) { //Open the Tenant Administration Context with ...


2

You can create site collections in SharePoint Online with C# using the client side object model. You will need to install the SharePoint client SDK first which includes the CSOM libraries and the all important Microsoft.Online.SharePoint.Client.Tenant.dll. There is a full walkthrough on how to get the client SDK and use the CSOM libraries with C# to create ...


2

You can implement like the following: $web = Get-SPWeb http://sharepoint.contoso.com/sites/sitecollection $web.AnonymousState = [Microsoft.SharePoint.SPWeb+WebAnonymousState]::Enabled $web.Update()


2

This is the default page of a publishing site. The content you see is in web parts, which can easily be removed. All of the links also exist in site settings, so this page is just trying to be helpful and present links for the most common tasks on a publishing site.


2

there are couple of options you can try to remove the orphan in the databases. Did you try to run the restore with force parameter? Detach the content DB wait for couple of min and re attach it try to repair the Content DB if you have site id (returning while running get-spsite) then you can forcefully delete it from SharePoint via powershell or stsadm ...


2

You can not have different web.config for different site collection. If you have different configuration for each sitecollection it is better to use site collection property bag


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

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

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

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


1

You can create that page as Site page or application page and deploy that. In this way you can get that page across all site collections. Creating Pages for SharePoint Creating Application Pages for SharePoint also check this response. Copy a page across different site collections


1

You could use a page viewer web part to view content from other websites (including a different SharePoint site collection). You'll likely need to use the isDlg=1 parameter on the query string for the page viewer source, and you might even need to create a custom view on the original list that checks the querystring in order to hide ribbon elements or ...



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