Showing posts with label create subsite. Show all posts
Showing posts with label create subsite. Show all posts

15 May, 2013

Create Site Collections, Subsites, Custom List by using PowerShell- SharePoint 2010


Creating of subsites, site collections, custom lists, and document libraries can be easily created by using GUI (i.e. Graphical User Interface) – very easy-correct? But let me tell you guys that all this activities are easier if you do it by using PowerShell. That’s why I am sharing the same so that you can use the following things in day to day activities.



What we are going to check in this article?
-Creation of site collections
-Creation of subsites
-Creation of custom list’s

HOW TO CREATE A SUBSITE IN SHAREPOINT 2010 BY USING POWERSHELL?

New-SPWeb –url<new site url> -name <new site name> -template <template name>

SUBSITE CREATION ALONG WITH SOME ADDITIONAL PARAMETERS:

New-SPWeb –url http://sharepoint2010/sites/MOSS2010/SUB2010 -name "All about SUBSITES" -template STS#0 –AddToTopNav –UniquePermissions –UseParentTopNav

HOW TO CREATE SITE COLLECTION IN SHAREPOINT 2010 USING POWERSHELL?

$siteURL = “http://sharepoint2010/sites/MOSS2010;

$owner = “moss2010/SPAdministrator1”

$secondOwner = “moss2010/SPAdministrator2”

$template = “STS#0″

$description = “PowerShell created Site Collection”

New-SPSite $siteURL -OwnerAlias $owner -SecondaryOwnerAlias $secondOwner -name “PowerShell for SharePoint” -Template $template -Description $description

HOW TO CREATE A CUSTOM LIST IN SHAREPOINT 2010 BY USING POWERSHELL?

$SPAssignment = Start-SPAssignment

$SPWeb = Get-SPWeb http://siteURL -AssignmentCollection $spAssignment

$SPWeb.ListTemplates | Select Name, Description

$SPTemplate = $SPWeb.ListTemplates["Custom List"]

$SPWeb.Lists.Add("List Title","Description",$SPTemplate)

If you have any queries/questions regarding the above mentioned information then please let me know, Thank you.

01 June, 2012

Mystery of save site as template in SharePoint 2010

Whenever this word “mystery” comes into the picture then lot of questions arises as what exactly it is, How exactly it works, is it really same as SP2007 and so many things…
Today I want to share some issues that I have experienced and want to help you if you come across the same. By doing this, I want to save your time as well as the headache while troubleshooting the issue. Okay, let starts…
First of all-new things to highlight first:
SharePoint 2007 V/S SharePoint 2010
Site Templates
Solutions
/_catalogs/wt/Forms/Common.aspx
_catalogs/solutions/Forms/AllItems.aspx
saved as .STP
Saved as .WSP
No activation
Activation exist

In SharePoint 2010, when we save any site as template then it will get stored under solution gallery (site actions-site settings-Galleries-solutions)
Now suppose the requirement is:
You want to transfer any site/subsite from one site collection to another then how we will do/How exactly we will proceed ?
It’s very easy:
§  Open the source site on which you are working on/ that you want to transfer
§  Site actions
§  Site settings
§  Save site as template (site settings-site actions-Save site as Template)
§  It will provide you a box in which you provide the template name details
§  Once you click OK then it will save the template in solution gallery
§  Click on the template name and it will give you the option to save it to desktop
§  Now go to the destination site (site actions-site settings-galleries-solutions)
§  Upload the solution that you have saved in previous steps
§  That’s it-Done!!
Not able to see the uploaded site under custom tab
Here the mystery arises J
We have executed each and every step in correct order but still not able to see the uploaded template under custom tab/how we can create a subsite if we can see that saved template?
Don’t worry guys-here is the solution:
§  Open the site where you have uploaded that .WSP file/Template
§  Site actions
§  Site settings
§  Galleries
§  Solutions
§  Hover your mouse to the dropdown of that template
§  You will see the option of ‘Activate’

§  That’s it-as soon as you activates the solution, it will be ready to use and you can see the template name under ‘Custom Tab’.

Now suppose the requirement is:
After deploying the solution, I still cannot see the template when I create new site collection via Sharepoint Central Administration
Here is the answer for this: If you want to have the template available in the default templates list when creating a site collection it has to be installed as a farm solution.  That means creating a Web Template or a custom site definition.  You can take the sandbox solution template and import it into Visual Studio as the basis for a Web Template.
I think most of doubts has already been clear after reading the above mentioned information…but please don’t worry, if you have any queries/questions/confusion then please let me know. I would be more than happy to help you as well as resolves your issues.
Thank you

30 March, 2011

Create a site collection by using Central Administration + SP2010


1. Verify that you have the following administrative credentials:

-To create a site collection, you must be a member of the Farm Administrators SharePoint group on the computer that is running the SharePoint Central Administration Web site.

2. On the Central Administration Web site, in the Application Management section, click Create site collections.

3. On the Create Site Collection page, in the Web Application section, if the Web application in which you want to create the site collection is not selected, on the Web Application menu click Change Web Application, and then click the Web application in which you want to create the site collection.

4. In the Title and Description section, type the title and description for the site collection.

5. In the Web Site Address section, select the path to use for your URL (for example, a wildcard inclusion path such as /sites/, or the root directory (/).

If you select a wildcard inclusion path, you must also type the site name to use in your site's URL.

6. In the Template Selection section, in the Select a template list, select the template that you want to use for the top-level site in the site collection, or click the Custom tab to create an empty site and apply a template later.

7. In the Primary Site Collection Administrator section, type the user name (in the form DOMAIN\username) for the user who will be the site collection administrator.

8. In the Secondary Site Collection Administrator section, type the user name for the secondary administrator of the site collection.

Designating a secondary site collection administrator is a best practice to ensure that someone can manage the site collection when a primary site collection administrator is not present.

9. If you are using quotas to manage storage for site collections, in the Quota Template section, click a template in the Select a quota template list.

10. Click OK.

If you have any queries/questions regarding the above mentioned information then please let me know,Thanks...