Configure NAT on Esxi Server

Configure NAT on Esxi Server

So one of my SharePoint projects that I am working on requires Federated Stuff and hence for all my testing I require two AD networks. As I have only one single ESXI server with one nic card, I was wondering how best to create a sort of NAT between two Virtual Switches. But since one Virtual Switch is already connected to the LAN and running live servers , I didn’t want to break anything. So I need some kind of firewall between both the different networks. My search led to Zentyal . They have a Virtual Machine appliance which is available here .

 

 

Original Network

My Original network was pretty straightforward. I had a router connected to my ISP which leads onto a switch and wireless router that served all my devices and an Esxi Host with One network card that kept all my Domain Controllers, Exchange, SharePoint and Database servers.

I The issue was that this weekend I had to prepare for Demo purposes , Federated Domains with ADRMS and SharePoint , Exchange , Lync and Database servers all existing on another demo domain. No issues building new VM’s and stuff but my problem was that I had only one Interface card on my Esxi host. I was trying to figure out how best can I split my Vmware Network as two different networks but all using the same Router to get to the Internet. I needed a new firewall in front of the New VM farm that I was building. So while all the VM’s were getting provisioned out I had some downtime while I waited.

So this is what I came up on paper. The steps involved where

  1. On my Esxi host, I created a new Virtual Switch and gave it a really meaningful name : Demo Network J
  2. Then Imported the Zyntal VM and gave the VM two virtual network cards. I connected Network Card 1 to the my LAN Virtual Switch, and the other network card to the new Virtual Switch that I created on Step 1
  3. Powered up the VM. The VM got an IP from my LAN DHCP on its Network Card 1 and so I was able to browse to the Firewall through that IP.
  4. Then it was pretty much setting up Gateway properties , Static Routes, a few Firewall rules so that I can RDP to all the servers on the Demo network and share Files and Internet and walla , a completely new network , a new domain with its own firewall and Domain network. Now I just hope my esxi host doesn’t die with all the over congestion.

Some Screenshots

It comes with a Windows style GUI and approach even though its built on linux

 

 

 

 

SharePoint 2010 Series Part 2 – Central Administration Post-Setup Configuration

Part 2 of the SharePoint 2010 series follows through from the basic installation and setup of an Application Server for SharePoint 2010 farm found here here .

The following are recommended configuration changes you should make before you let users into your SharePoint environment and erm make a mess of it J

They are as follows:-

  1. State Service Application and Proxy
  2. Secure Store Service
  3. Outgoing Email
  4. Configuring Search Service and Crawl Service
  5. Health and Diagnostic Logging
  6. Monitoring Drive Space
  7. Web Analytics

Recommended reading : Technet about Service Application

State Service Application and Proxy

State Service can be installed using the Configuration Wizard under Central Admin but I strongly recommend the use of PowerShell scripts which can be easily available from State Service via PowerShell on TechNet

Scripted Install of State Service

1
2
3
4
5
6
7
8
9
10
#SharePoint Service Applications - State Service

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
. .\config.ps1

Write-Host -ForegroundColor Blue "Creating State Service and Proxy..."
New-SPStateServiceApplication -Name $stateSAName | New-SPStateServiceApplicationProxy -Name "$stateSAName Proxy" -DefaultProxyGroup > $null
Write-Host -ForegroundColor Blue "Finished Creating State Service and Proxy... Connecting State Service to existing Database"
Mount-SPStateServiceDatabase –Name $spSAStateServiceDB –DatabaseServer $databaseServerName –ServiceApplication $stateSAName –Weight 10 | Initialize-SPStateServiceDatabase
Write-Host -ForegroundColor Blue "State Service Script Completed."

I would be first pre creating the database on the SQL server

Note: the Collation ID should be “Latin1_General_CI_AS_KS_WS”

On the SharePoint Server open PowerShell under the administrator mode.

The reason I hit the error was to show most normal scenario when you would have a separate DBA team that manage the SQL server. When you send a request for a Database to be created for SharePoint make sure that you provide the DBA with the service account that you use to install SharePoint. In the case of this post domain\srvPRDSPSetup. So now I will go add an extra user called Setup Account with DB_owner permission on the SQL server for the database

Once that has been completed, before running the script don’t forget to go and delete the State Service Application that was created previously before installing it again

Now let’s try that again

Secure Store Service

Before I go ahead and create a Secure Store Service, I am going to create a new service account called SharePoint Service Applications account to manage all my service applications and their application pool account. So within my SharePoint OU I create a new service account

Back on the SharePoint server I am going to add this account to the managed accounts within SharePoint.

A very useful feature within SharePoint 2010 is the managed Accounts section because you can provide the SharePoint with a lot more scope around the service account.

To install via GUI method you can browse to the Application Management page and choose to create a new Secure Store Service Application by filling in all the details.

But where’s the fun in that??

Scripted Install

First and foremost I am going to create an application Pool for all the services to make use of

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#SharePoint Service Application App Pool

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
. .\config.ps1

Write-Host -ForegroundColor Green "************************************************************"
#Creating New Application Pool and Authentication
$saAppPool = Get-SPServiceApplicationPool -Identity $saAppPoolName -EA 0
if($saAppPool -eq $null)
{
Write-Host -ForegroundColor Blue "Creating Service Application Pool..."
$appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0
if($appPoolAccount -eq $null)
{
Write-Host -ForegroundColor RED "Please supply the password for the Service Account..."
$appPoolCred = Get-Credential $appPoolUserName
$appPoolAccount = New-SPManagedAccount -Credential $appPoolCred -EA 0
}
$appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0
if($appPoolAccount -eq $null)
{
Write-Host -ForegroundColor RED "Cannot create or find the managed account $appPoolUserName, please ensure the account exists."
Exit -1
}
New-SPServiceApplicationPool -Name $saAppPoolName -Account $appPoolAccount -EA 0 > $null
}
Write-Host -ForegroundColor Red "Finished Creating Application Pool for SharePoint Web Services"
Write-Host -ForegroundColor Green "************************************************************"


Next I will run the Secure Store Script

1
2
3
4
5
6
7
8
9
10
11
12
#SharePoint Service Applications - Secure Store

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
. .\config.ps1

#Secure Store Service and Proxy
Write-Host -ForegroundColor Green "************************************************************"
Write-Host -ForegroundColor Blue "Creating Secure Store Service and Proxy..."
New-SPSecureStoreServiceapplication -Name $secureStoreSAName -Sharing:$false -DatabaseServer $databaseServerName -DatabaseName $spSASecureStoreDB -ApplicationPool $saAppPoolName -auditingEnabled:$true -auditlogmaxsize 30 | New-SPSecureStoreServiceApplicationProxy -name "$secureStoreSAName Proxy" -DefaultProxygroup > $null
Get-SPServiceInstance | where-object {$_.TypeName -eq "Secure Store Service"} | Start-SPServiceInstance > $null
Write-Host -ForegroundColor Blue "Finished Creating Secure Store Service and Proxy..."
Write-Host -ForegroundColor Green "************************************************************"

The Config file that both the scripts use



Once the service application has completed install, browse via Central Admin to the Applications management page to Secure Store Service

Highlight Secure Store Service and click on Manage from the ribbon

Click on Generate new Key from the top of the ribbon

Type the passphrase to be used

The following screen shows the end of secure store service for the time being

Outgoing Email Setup

Currently I am still rebuilding my Exchange 2010 server in my environment, and hopefully during the Xmas break I will finish setting it upJ. But for the time being the following steps will need to be completed to setup the Outgoing email server on SharePoint 2010. You can also use a simple SMTP setup at this stage as well.

  1. Open Central Admin and browse to System Settings

  2. Click on “Configure Outgoing Email Settings”

This completes the setup of Outgoing Email Server

Configuring Search

While SharePoint and Search requires much much much much more deeper discussion, at this stage of my Install all the post is going to cover are basic setup of Search application ( Out of the box search) and then go on to schedule a search.

First and foremost we need to switch on Foundation Search

  1. Create two service accounts – SharePoint Search Service and SharePoint Crawl Service accounts and add them to the managed accounts within SharePoint

  2. Open Central Admin and browse to “Manage Services on Server”
  3. Scroll down to SharePoint Foundation Search which will show as “Stopped” and click on start

    The service will start now

Search Service Application and Proxy

Search Script

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#SharePoint Service Application - Search Service

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
. .\config.ps1

# 1.Setting up some initial variables.
Write-Host -ForegroundColor Blue 1.Setting up some initial variables.
sleep 5
$SSAName = "SharePoint Search Service"
$SVCAcct = "Domain\srvPRDSPSearchsvc"
$SSI = get-spenterprisesearchserviceinstance -local
$err = $null
$SearchAdminDB = "SP_SERVICE_SEARCH_DB"
$SearchServiceProxy = "Search Service Proxy"
$SearchPropertyDB = "SP_SERVICE_SEARCH_PROPERTY_DB"
$SearchCrawlDB = "SP_SERVICE_SEARCH_CRAWL_DB"

# Start Services search services for SSI
Write-Host -ForegroundColor Blue Start Services search services for SSI
Start-SPEnterpriseSearchServiceInstance -Identity $SSI

# 2.Create an Application Pool.
Write-Host -ForegroundColor Blue 2.Create an Application Pool.
$AppPool = new-SPServiceApplicationPool -name $SSAName"-AppsPool" -account $SVCAcct

# 3.Create the SearchApplication and set it to a variable
Write-Host -ForegroundColor Blue 3.Create the SearchApplication and set it to a variable
$SearchApp = New-SPEnterpriseSearchServiceApplication -Name $SSAName -applicationpool $AppPool -databasename $SearchAdminDB"_DB"

#4 Create search service application proxy
Write-Host -ForegroundColor Blue 4 Create search service application proxy
$SSAProxy = new-spenterprisesearchserviceapplicationproxy -name $SearchServiceProxy -Uri $SearchApp.Uri.AbsoluteURI

# 5.Provision Search Admin Component.
Write-Host -ForegroundColor Blue 5.Provision Search Admin Component.
set-SPenterprisesearchadministrationcomponent -searchapplication $SearchApp  -searchserviceinstance $SSI

# 6.Create a new Crawl Topology.
Write-Host -ForegroundColor Blue 6.Create a new Crawl Topology.
$CrawlTopo = $SearchApp | New-SPEnterpriseSearchCrawlTopology

# 7.Create a new Crawl Store.
Write-Host -ForegroundColor Blue 7.Create a new Crawl Store.
$CrawlStore = $SearchApp | Get-SPEnterpriseSearchCrawlDatabase

# 8.Create a new Crawl Component.
Write-Host -ForegroundColor Blue 8.Create a new Crawl Component.
New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopo -CrawlDatabase $CrawlStore -SearchServiceInstance $SSI

# 9.Activate the Crawl Topology.
Write-Host -ForegroundColor Blue 9.Activate the Crawl Topology.
do
{
$err = $null
$CrawlTopo | Set-SPEnterpriseSearchCrawlTopology -Active -ErrorVariable err
if ($CrawlTopo.State -eq "Active")
{
$err = $null
}

Start-Sleep -Seconds 10
}
until ($err -eq $null)

# 10.Create a new Query Topology.
Write-Host -ForegroundColor Blue 10.Create a new Query Topology.
$QueryTopo = $SearchApp | New-SPenterpriseSEarchQueryTopology -partitions 1

# 11.Create a variable for the Query Partition
Write-Host -ForegroundColor Blue 11.Create a variable for the Query Partition
$Partition1 = ($QueryTopo | Get-SPEnterpriseSearchIndexPartition)

# 12.Create a Query Component.
Write-Host -ForegroundColor Blue 12.Create a Query Component.
New-SPEnterpriseSearchQueryComponent -indexpartition $Partition1 -QueryTopology $QueryTopo -SearchServiceInstance $SSI

# 13.Create a variable for the Property Store DB.
Write-Host -ForegroundColor Blue 13.Create a variable for the Property Store DB.
$PropDB = $SearchApp | Get-SPEnterpriseSearchPropertyDatabase

# 14.Set the Query Partition to use the Property Store DB.
Write-Host -ForegroundColor Blue 14.Set the Query Partition to use the Property Store DB.
$Partition1 | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropDB

# 15.Activate the Query Topology.
Write-Host -ForegroundColor Blue 15.Activate the Query Topology.
do
{
$err = $null
$QueryTopo | Set-SPEnterpriseSearchQueryTopology -Active -ErrorVariable err -ErrorAction SilentlyContinue
Start-Sleep -Seconds 10
if ($QueryTopo.State -eq "Active")
{
$err = $null
}
}

until ($err -eq $null)

Write-Host -ForegroundColor RED "Your search application $SSAName is now ready"
Write-Host -ForegroundColor RED "*********************************************"


This concludes the initial setup of Search Service Application. Setting up a Crawl would be covered when the installation reaches a stage where there is data to be crawled by the SharePoint server.

Usage, Health and Diagnostic Logging Setup

To set this up on the fly, Central Admin Website would be the most recommended method as it would give you a bit more functions and features to be setup on the initial process itself when compared to Scripted methods found here and here .

  1. Open Central Admin Website and click on the Monitoring Tab

  2. Click on “Configure usage and health data collection”
  3. Configure the page as required.
  4. Recommendation is to change the location of the default log files to another location other than the system drive.
  5. If you are following a naming convention for databases this can be used for the Logging Database as well.

  6. Click OK to save the settings

Recommendation: Go through the Health and Log Collection Schedule to customize these according to the needs of your organization.

  1. Under the Monitoring Page now click on “Configure Diagnostic Logging”
  2. Recommended to change the location and size of the Trace log files

If you find the Proxy service stopped under the “Manage Service Applications” Page run the following script to fix it

1
2
3
4
5
6
7
#SharePoint Start Usage and Health Proxy Service

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
. .\config.ps1

$Usage = Get-SPServiceApplicationProxy | where {$_.TypeName -eq "Usage and Health Data Collection Proxy"}
$Usage.provision()

Thanks to Avinash for the article on the same found here .

Monitoring Drive Space

Your SharePoint server is going to grow and it’s going to grow huge. Some of the usual suspects for the same are:-

  1. IIS Logs
  2. Web App Directories (Basically your IIS Files)
  3. SharePoint Logs
  4. SharePoint Usage and Data Collection
  5. SharePoint Search Index

On my SharePoint VM I have got another partition where I place all the baddies away from my system Drive

Web Analytics

To configure Web Analytics via Central Admin, browse through “Manage Service Applications” and create a new Web Analytic Service and Proxy.

To configure via PowerShell use the following script

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#SharePoint Service Application - Web Analytics

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
. .\config.ps1

#Web Analytics
Write-Host -ForegroundColor Green "********************************************"
Write-Host -ForegroundColor Blue "Creating Web Analytics Service and Proxy..."
$stagerSubscription = ""
$reportingSubscription = ""
New-SPWebAnalyticsServiceApplication -Name $WebAnalyticsSAName -ApplicationPool $saAppPoolName -ReportingDataRetention 20 -SamplingRate 100 -ListOfReportingDatabases $reportingSubscription -ListOfStagingDatabases $stagerSubscription > $null
New-SPWebAnalyticsServiceApplicationProxy -Name "$WebAnalyticsSAName Proxy" -ServiceApplication $WebAnalyticsSAName > $null
Get-SPServiceInstance | where-object {$_.TypeName -eq "Web Analytics Web Service"} | Start-SPServiceInstance > $null
Get-SPServiceInstance | where-object {$_.TypeName -eq "Web Analytics Data Processing Service"} | Start-SPServiceInstance > $null
Write-Host -ForegroundColor Green "********************************************"

This pretty much concludes the Post- Install steps after Central Admin Website is up and running.

SharePoint 2010 Series Part 1 – Installation

This post tries to cover topics thats relevant for building a Proof of Cocept (POC) or Test Environment SharePoint 2010 servers. The first part covers the basic installation of an Application Server for SharePoint within a 2-Tier server Model.

For smaller SharePoint 2010 installation such as foundation server,please refer to the Foundation Server post found here .

Introduction

The post tries to cover some of the basic requirements to be covered off before starting the installation and the gets into the installation process itself. The steps should be followed to be build a Proof of concept server (POC) or a development environment (DEV) before going production. Wherever possible, both GUI and Scripted options will be shown. To get a much deeper understanding, TECHNET should be used as your bible J.

Some of the basic components for a SharePoint 2010 that would be looked into via the post are :-

  1. SharePoint Server
  2. SQL Database Server
  3. Service Accounts (For running SharePoint)
  4. Virtualization or Physical Servers

Capacity planning, architecture of a SharePoint Farm is a completely different ball game and would be covered in another post.

Playground for this post involves the usual suspects:-

  1. Windows 2008 R2 Servers and Domain
  2. SQL 2008 R2
  3. SharePoint 2010
  4. Esxi Server host.

Active Directory

Creating service accounts helps avoid a lot of pitfalls during and after the installation of SharePoint. First and foremost , different service accounts for different parts of SharePoint ensures that troubleshooting would be much simpler , minimize the impact of an outage of a service account or part of SharePoint from the rest of the built and so forth.

I am currently rebuilding the network at home and thought it would be a good chance to completely rebuild the whole domain and start everything from scratch. So I have a brand new Windows 2008 R2 Domain Controller and have only started to populate the AD. For SQL server, a service account was created for use within the SQL server installation for all the services that run within it.

For SharePoint, I have initially created a SharePoint Setup Account and a SharePoint Farm Account. There will be requirement to create more service accounts but the post will cover them as it goes through the installation process. So in order to kick start the installation, the requirement is for these 2 accounts to be created within the AD. Depending on the different environments that would be built within your organization ( DEV,TEST, PPTE/ Pre Prod , PRD,DR) create different service accounts to reflect the different environments.

Note: The service accounts will need to have the following settings


To start the installation process, the above mentioned steps would currently suffice.

SQL Server

There are a few steps to be completed on the SQL Server side of things, so as to prep the server for your SharePoint Installation. They are:

  1. Security Role permissions within SQL for the SharePoint service accounts
  2. Database settings

Security roles for SharePoint Setup and Farm Account will need to be completed before starting with the installation process. The Farm account doesn’t necessarily have to be manually provided any permission as the SharePoint installation process should complete the same.

Create a new login for SharePoint Setup account as shown below

And now provide the login with server roles as shown below

SharePoint Databases can be created in two ways. The installer can create the databases as the installation process goes through or you can also pre create your databases. The advantageous of pre creating databases is that the databases can be customized for their sizing, log file size and growth aspect and so forth. This helps a lot with the capacity planning that goes with SharePoint. Both methods are equally supported for the installation of SharePoint. Most scenarios where a pre created Database comes into effect are in situations when your database servers are looked after by a different team or organization for that matter. A list of databases can be provided with their sizing , naming conventions and other settings.

SharePoint Installation

Preparing the SharePoint Server with the pre requisite software is the first and foremost step that needs to be completed before starting the SharePoint Setup. If your SharePoint server has Internet connectivity, then the easiest way to install the pre requisite software would be to get to the Splash page of the SharePoint installer and choose the option to install the software. This will initiate the download of the hotfixes and setting up of the Application and Web Server roles on the SharePoint server.

Recommendation: Download all the individual Pre requisite software onto a common folder before and complete the installations and then run the pre requisites installer to setup the Application and Web Server roles on the server.

Once this has completed, the SharePoint 2010 binaries can be installed as followed

Choose “Server Farm” as the installation model for the installation.

On the file Location Tab on the next window choose to change the location of the Index Files to a different partition as this will grow tremendously. Default location is the System Drive and this should be changed strongly espacially for a production environment.

The Binaries can also be installed using PowerShell but the option to choose the location of the Index file cannot be placed at the same time the installation, but can be later changed. This is the only difference between doing a GUI installation of SharePoint 2010 Binaries compared to PowerShell installation.

Choose “Complete” as the server type to install all components.

This pretty much starts the installation process.

Untick the option to Run the config wizard now and instead “RESTART the Server at this stage”

Scripted Install of SharePoint 2010 Binaries

  1. Set PowerShell to enable the remote execution of scripts. Open PowerShell and paste the command displayed below and click “Y” to enable the execution of scripts.

1
Set-ExecutionPolicy Remotesigned

  1. For the Script, I have created a folder within the System Drive as shown and will place all my scripts within this folder to be called by PowerShell or later by the SharePoint Management Shell. I have also downloaded and saved SPmodule (Download Link) onto the same folder. Set all the values within the script accordingly.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    #SharePoint Binaries Installation
    #Importing PowerShell Module for SharePoint 2010
    Write-Host -ForegroundColor Blue "Importing SharePoint PowerShell Binaries"
    $env:PSModulePath = $env:PSModulePath + ";C:\SP\Scripts\SPModule"
    Import-Module SPModule.misc
    Import-Module SPModule.setup
    Write-Host -ForegroundColor Blue "Modules have been imported"
    Write-Host -ForegroundColor Blue "**************************"
    Write-Host -ForegroundColor Blue "Installing SharePoint Binaries"
    Install-SharePoint -SetupExePath "D:\setup.exe" -PIDKey "XXXX-XXXX-XXXX-XXXX"
    Write-Host -ForegroundColor Blue "Finished Installing SharePoint Binaries"
    Write-Host -ForegroundColor Blue "**************************"

SharePoint Config Wizard and Central Admin Website Setup

Once the server has rebooted from the last process, start the SharePoint Config Wizard from under the SharePoint folder on “All Programs”.

Choose the option to crate a new server farm.

Enter the details of the SQL server, the name for the Configuration Database for SharePoint along with the SharePoint Farm Account username and password. Use the Domain\username format.

The SharePoint farm account will be enabled the required Server Roles on the SQL server . This account is also known as the Database access account for SharePoint. At this point there is no option to use a proper naming convention for the Central Admin Website Content Database and will be pre created by the installer using a random name. Using scripted installation this can be avoided.

This will kick start the installation progress once the port for Central Admin and the type of Authentication (Choose NTML) has been completed and a summary page will be displayed.

Scipted Method of Install

From here on, the scripts will initially call a config file that contains all the variables that need to be passed within the scripts.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#SharePoint Configuration Wizard
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
. .\config.ps1
Write-Host -ForegroundColor White "*************************************************************"
Write-Host -ForegroundColor Blue " - Preparing the Configuration Wizard for SharePoint Install"
New-SPConfigurationDatabase -DatabaseName $farmConfigDBName -DatabaseServer $databaseServerName -AdministrationContentDatabaseName $farmAdminContentDBName -Passphrase (ConvertTo-SecureString "pass@word1" -AsPlaintext -Force) -FarmCredentials (Get-Credential)
Write-Host -ForegroundColor Blue " - Finished Configuration Setup of SharePoint"
Write-Host -ForegroundColor White "*************************************************************"
Sleep 10
Write-Host -ForegroundColor Green "*************************************************************"
Write-Host -ForegroundColor Blue "Initializing SharePoint Central Administration Setup"
Install-SPHelpCollection -All
Initialize-SPResourceSecurity
Install-SPService
Install-SPFeature –AllExistingFeatures
New-SPCentralAdministration -Port $SSLPORT  -WindowsAuthProvider "NTLM"
Install-SPApplicationContent
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck"  -value "1" -PropertyType dword
Write-Host -ForegroundColor Blue "Finished Setting Up Central Administration Website"
Write-Host -ForegroundColor Green "*************************************************************"

The first script will be used to run the configuration Wizard to setup the Config Database and Admin Database

I will be using the script to create two databases called “SP_CONFIG_DB” and “SP_CONTENT_CA_DB” . The scripts can also connect to these databases if they are precreated within the SQL server. For the sake of the post, I will be precreating the databases and the using then same script to connect to them.


The databases have to be created using the Collation “Latin1_General_CI_AS_KS_WS”


The two precreated databases can be seen here

Note: If these databases have been created by another user account other than SharePoint Setup Account (Which would be the situation most of the time, since your DBA administrator would be making these databases for you) ensure that both the Setup and Farm accounts for SharePoint are added as new users for these two databases with DB_owner permissions associated.


As mentioned before the config file contains the variables for the scripts to execute

Run the script from the PowerShell Window and it will ask you to enter the Farm account credentials

At this point the Central Admin Website can be opened using http://Server_Name:Port_Number

This completes the basic Installation of SharePoint Application Server.

SharePoint 2010 Scripts Repository

Going to be slowly updating this post with links to useful SharePoint 2010 scripts that I would have gathered and may have edited as well.

1. SharePoint 2010 Prerequisite Softwares Downloader.

This script is quite useful in most scenarios where you don’t want all the servers within your different environments having to connect every time to download prerequisite software’s that need to be installed before you can go ahead with SharePoint 2010 Binary installation. Upon execution the script will ask for a folder to be named that would hold all the downloaded files.

sharepoint2010PreReqDownloader

2. SharePoint 2010 Pre reqs that are required on Windows 2008 R2 Servers

File name: SharePoint Pre Reqs.zip
File size:94.48 MB