Powered By Blogger

Aug 2, 2012



Create Web Applications and Site Collections using SharePoint 2010 Management Shell



This blog post describes how to create Web Applications and Site Collections using SharePoint 2010 Management Shell . First you need to open the Management shell.

Go to the Start menu -> All Programs and select SharePoint 2010 Management Shell under Microsoft SharePoint 2010 Products and run the program as administrator.



To create a new Web Application we use the command New-SPWebApplication. We have to give a Name for the Web Application, Name for an Application pool, name of the Application pool account, the URL and a Port number.

Example :




After you enter the above command you will see a confirmation command window as shown below.


If you want to get more information about the command parameters, you can use the Get- Help New- SPWebApplication command.


Now lets create a Site Collection. We use the command New-SPSite to create a new site.


Then we need to add the URL to access the site collection which we created and the Site collection administrator. After you entered those commands you will get a command window as shown below.



If you don't specify the Template parameter then you will get a widow to select it when you try to open the site collection which you created . I have selected the Team Site Template


If you want to add the Template by using the command when you create the Site Collection. Then first assign the template to a variable as shown below. 


Then insert the command to create a new SPSite.



If you want to get more information about the Templates, you can use the Get-SPWebTemplate
command



If you want to know about the command parameters for a site, you can use Get-Help New-SPSite command.


Now you can access to the site collection which you created using the URL.







No comments:

Post a Comment