Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

SharePoint 2010 and PowerShell: Real-World Solutions : Automate a SharePoint 2010 Installation

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
4/26/2013 3:52:53 PM

The preceding examples show the basic steps used to provision a new SharePoint 2010 farm. We can automate the procedure of creating new SharePoint 2010 farm by placing the following code in a script named New-SPInstallation.ps1.

<#
.SYNOPSIS
Automates a SharePoint 2010 installation.

.DESCRIPTION
The script automates a SharePoint 2010 installation.
Requires that the binaries are installed on the server.

.PARAMETER databaseName
Name of the configuration database.

.PARAMETER databaseServer
Name of the database server.

.PARAMETER centralAdminDatabase
Name of the Central Administration content database.

.PARAMETER port
Port to use.

.PARAMETER windowsAuthProvider
NTLM or Kerberos, default set to NTLM.

.PARAMETER userName
Farm Administrator account in the format 'domain\username'.

.PARAMETER password
Password for the Farm Administrator account.

.PARAMETER passPhrase
Farm password, used to add new machines to the farm.
#>

param(
  [string]$databaseName,
  [string]$databaseServer,
  [string]$centralAdminDatabase,
  [string]$port,
  [string]$windowsAuthProvider = "NTLM",
  [string]$userName,
  [string]$password,
  [string]$passPhrase
)
# Converting password strings to secure strings
$securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force
$securePassPhrase = ConvertTo-SecureString -String $passPhrase -AsPlainText -Force

# Creating a PSCredential object
$psCredentials =

New-Object -TypeName System.Management.Automation.PSCredential `
-ArgumentList $userName, $securePassword

# New Configuration Database
New-SPConfigurationDatabase -DatabaseName $databaseName `
-DatabaseServer $databaseServer `
-AdministrationContentDatabaseName $centralAdminDatabase `
-Passphrase $securePassPhrase -FarmCredentials $psCredentials

# Install help files
Install-SPHelpCollection -All

# Install services
Install-SPService

# Install Features
Install-SPFeature -AllExistingFeatures

# Create a new Central Administration
New-SPCentralAdministration -Port $port -WindowsAuthProvider $windowsAuthProvider

# Copy shared application data
Install-SPApplicationContent


					  

We can run the script by typing the following:

PS > .\New-SPInstallation.ps1 -databaseName "NimaIntranet_ConfigDB" `
>> -databaseServer "SQLServer01" `

>> -centralAdminDatabase "NimaIntranet_Admin_ContentDB" -port 5057 `
>> -userName "powershell\administrator" `
>> -password "SecretP@ssw0rd" -passPhrase "J0inD0main"

The New-SPInstallation.ps1 script creates a new configuration database and installs the help collections, the services required, and all existing features. It also sets up Central Administration and adds shared application content.

Tip

A number of solutions for scripted installations using Windows PowerShell are available on the Internet. One is the Microsoft-provided SPModule, which can be found on TechNet (http://technet.microsoft.com/en-us/library/cc262839.aspx#section1). You can also find solutions on Codeplex; for example, AutoSPInstaller is available from that site (http://autospinstaller.codeplex.com/).

Other -----------------
- SharePoint 2010 and PowerShell: Real-World Solutions : Scripted Installation of SharePoint 2010 Using Windows PowerShell
- Microsoft Systems Management Server 2003 : Using the Distribute Software To Collection Wizard
- Microsoft Systems Management Server 2003 : Configuring the Software Distribution Component
- Client Access to Exchange Server 2007 : Getting the Most Out of the Microsoft Outlook Client - Security Enhancements in Outlook 2007
- Client Access to Exchange Server 2007 : Getting the Most Out of the Microsoft Outlook Client - What's New in Outlook 2007
- Windows Server 2008 R2 : High Availability, Live Migration, and Snapshots
- SharePoint 2010 : Configuring Search Settings and the User Interface - Search Alerts Administration, Search Suggestions
- SharePoint 2010 : Configuring Search Settings and the User Interface - Search Keywords
- BizTalk Server 2006 : Starting a New BizTalk Project - Creating a Build-and-Integration Environment (part 2) - Using Test-Driven Development, Creating a BizTalk Installation Package
- BizTalk Server 2006 : Starting a New BizTalk Project - Creating a Build-and-Integration Environment (part 1) - Five-Step Build Process
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server