Translate

Saturday, November 30, 2013

Provisioning a SharePoint 2010 Farm Service Applications using a PowerShell Script

 
This video is best if watched in Full Screen mode:  http://www.youtube.com/watch?v=3HAjO8yiANM  and any references to completed services should really say, the powershell script has completed creating the service application and you still need to manually configure it, just as you would if the service were created by the White Wizard.  Difference with this method is that it generates a SharePoint environment containing database names that are GUID free.
 




Here's another video of this process


Contents of Bus.ps1 Replaces the White Wizard\Farm Wizard

It places all the service applications under one application pool in IIS

#####################################################
This script replicates most of the functionality found in the SharePoint Products Configuration Wizard with the EXCEPTION of the USER PROFILE SERVICE
##################################################### 
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

## Settings you may want to change ##
$databaseServerName = “2010SQL”
$searchServerName = “2010WEB1” #Front end Server that will run central admin, the server you’re on right now
$saAppPoolName = “SharePoint Web Services Default”
$appPoolUserName = “DOMAIN\MyFarmer” #farm admin account for Timer and Central admin, check that both services are running under this account before
# running this script

## Service Application Service Names ##
$accesssSAName = “Access Services”
$bcsSAName = “Business Data Connectivity Service”
$excelSAName = “Excel Services Application”
$metadataSAName = “Managed Metadata Web Service”
$performancePointSAName = “PerformancePoint Service”
$searchSAName = “SharePoint Server Search”
$stateSAName = “State Service”
$secureStoreSAName = “Secure Store Service”
$usageSAName = “Usage and Health Data Collection Service”
$userProfileSAName = “User Profile Synchronization Service”
$visioSAName = “Visio Graphics Service”
$WebAnalyticsSAName = “Web Analytics Service”
$WordAutomationSAName = “Word Automation Services”


$saAppPool = Get-SPServiceApplicationPool -Identity $saAppPoolName -EA 0
if($saAppPool -eq $null)
{
Write-Host “Creating Service Application Pool…”

$appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0
if($appPoolAccount -eq $null)
{
Write-Host “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 “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 “Creating Usage Service and Proxy…”
$serviceInstance = Get-SPUsageService
New-SPUsageApplication -Name $usageSAName -DatabaseServer $databaseServerName -DatabaseName “UsageDB” -UsageService $serviceInstance > $null

 Write-Host “Creating Access Services and Proxy…”
New-SPAccessServiceApplication -Name $accesssSAName -ApplicationPool $saAppPoolName > $null
Get-SPServiceInstance | where-object {$_.TypeName -eq “Access Database Service”} | Start-SPServiceInstance > $null

 Write-Host “Creating BCS Service and Proxy…”

New-SPBusinessDataCatalogServiceApplication -Name $bcsSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “BusinessDataCatalogDB” > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Business Data Connectivity Service”} | Start-SPServiceInstance > $null

 Write-Host “Creating Excel Service…”
New-SPExcelServiceApplication -name $excelSAName –ApplicationPool $saAppPoolName > $null
 

Set-SPExcelFileLocation -Identity “http://” -ExcelServiceApplication $excelSAName -ExternalDataAllowed 2 -WorkbookSizeMax 10 -WarnOnDataRefresh:$true

Get-SPServiceInstance | where-object {$_.TypeName -eq “Excel Calculation Services”} | Start-SPServiceInstance > $null

Write-Host “Creating Metadata Service and Proxy…”

New-SPMetadataServiceApplication -Name $metadataSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “MetadataDB” > $null
 

New-SPMetadataServiceApplicationProxy -Name “$metadataSAName Proxy” -DefaultProxyGroup -ServiceApplication $metadataSAName > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Managed Metadata Web Service”} | Start-SPServiceInstance > $null


 Write-Host “Creating Performance Point Service and Proxy…”

New-SPPerformancePointServiceApplication -Name $performancePointSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “PerformancePointDB” > $null
 

New-SPPerformancePointServiceApplicationProxy -Default -Name “$performancePointSAName Proxy” -ServiceApplication $performancePointSAName > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “PerformancePoint Service”} | Start-SPServiceInstance > $null


##START SEARCH

Write-Host “Creating Search Service and Proxy…”
Write-Host ” Starting Services…”
Start-SPEnterpriseSearchServiceInstance $searchServerName
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $searchServerName

Write-Host ” Creating Search Application…”
$searchApp = New-SPEnterpriseSearchServiceApplication -Name $searchSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “SearchDB”
$searchInstance = Get-SPEnterpriseSearchServiceInstance $searchServerName

Write-Host ” Creating Administration Component…”
$searchApp | Get-SPEnterpriseSearchAdministrationComponent | Set-SPEnterpriseSearchAdministrationComponent -SearchServiceInstance $searchInstance


##Crawl
Write-Host ” Creating Crawl Component…”
$InitialCrawlTopology = $searchApp | Get-SPEnterpriseSearchCrawlTopology -Active
$CrawlTopology = $searchApp | New-SPEnterpriseSearchCrawlTopology
$CrawlDatabase = ([array]($searchApp | Get-SPEnterpriseSearchCrawlDatabase))[0]
$CrawlComponent = New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology -CrawlDatabase $CrawlDatabase -SearchServiceInstance $searchInstance
$CrawlTopology | Set-SPEnterpriseSearchCrawlTopology -Active

Write-Host -ForegroundColor white ” Waiting for the old crawl topology to become inactive” -NoNewline
do {write-host -NoNewline .;Start-Sleep 6;} while ($InitialCrawlTopology.State -ne “Inactive”)
$InitialCrawlTopology | Remove-SPEnterpriseSearchCrawlTopology -Confirm:$false
Write-Host

 ##Query
Write-Host ” Creating Query Component…”
$InitialQueryTopology = $searchApp | Get-SPEnterpriseSearchQueryTopology -Active
$QueryTopology = $searchApp | New-SPEnterpriseSearchQueryTopology -Partitions 1
$IndexPartition= (Get-SPEnterpriseSearchIndexPartition -QueryTopology $QueryTopology)
$QueryComponent = New-SPEnterpriseSearchQuerycomponent -QueryTopology $QueryTopology -IndexPartition $IndexPartition -SearchServiceInstance $searchInstance
$PropertyDatabase = ([array]($searchApp | Get-SPEnterpriseSearchPropertyDatabase))[0]
$IndexPartition | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase
$QueryTopology | Set-SPEnterpriseSearchQueryTopology -Active

 Write-Host ” Creating Proxy…”
$searchAppProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name “$searchSAName Proxy” -SearchApplication $searchSAName > $null


#####END SEARCH


Write-Host “Creating State Service and Proxy…”
New-SPStateServiceDatabase -Name “StateServiceDB” -DatabaseServer $databaseServerName | New-SPStateServiceApplication -Name $stateSAName | New-SPStateServiceApplicationProxy -Name “$stateSAName Proxy” -DefaultProxyGroup > $null

 Write-Host “Creating Secure Store Service and Proxy…”

New-SPSecureStoreServiceapplication -Name $secureStoreSAName -Sharing:$false -DatabaseServer $databaseServerName -DatabaseName “SecureStoreServiceAppDB” -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
#USER PROFILE SERVICE Creation commented out because there are still known issues
with creating it via powershell
 #Write-Host “Creating User Profile Service and Proxy…”
#$userProfileService = New-SPProfileServiceApplication -Name $userProfileSAName -ApplicationPool $saAppPoolName -ProfileDBServer $databaseServerName -#ProfileDBName “ProfileDB” -SocialDBServer $databaseServerName -SocialDBName “SocialDB” -ProfileSyncDBServer $databaseServerName -ProfileSyncDBName “SyncDB”
#New-SPProfileServiceApplicationProxy -Name “$userProfileSAName Proxy” -ServiceApplication $userProfileService -DefaultProxyGroup > $null
#Get-SPServiceInstance | where-object {$_.TypeName -eq “User Profile Service”} | Start-SPServiceInstance > $null

 Write-Host “Creating Visio Graphics Service and Proxy…”

New-SPVisioServiceApplication -Name $visioSAName -ApplicationPool $saAppPoolName > $null
 

New-SPVisioServiceApplicationProxy -Name “$visioSAName Proxy” -ServiceApplication $visioSAName > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Visio Graphics Service”} | Start-SPServiceInstance > $null

 Write-Host “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 “Creating Word Conversion Service and Proxy…”

New-SPWordConversionServiceApplication -Name $WordAutomationSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “WordAutomationDB” -Default > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Word Automation Services”} | Start-SPServiceInstance > $null
############################################## End Script

Now proceed to manually configuring your service applications (e.g. the Secure Store Service for Excel Services, Visio graphics, and performance point. The managed meta data service for a content type hub)

See this post starting at step 8 for steps to configure the  User Profile Service

Saturday, November 23, 2013

Links to Software to create a home lab

Pre-requisite:  A server with at least 16 GB of RAM
 



http://technet.microsoft.com/en-us/evalcenter/default - all Evaluation Software

http://technet.microsoft.com/en-US/evalcenter/dn407368 - previous editions (e.g. windows server 2008 R2, Sharepoint 2010, etc)


Here are your  high level steps:

On your server with 16-32 GB of ram and xeon processors, run up either Vmware, or install Windows Server 2012 Datacenter and install the Hyper-V role

Then create a VM and
Install DNS or just wait for active directory to install it on your first DC
Install Active Directory Domain Services,



Create another domain controller and join it into the domain for redundancy
Create some Host (A) records in DNS

Start creating your vm’s for your farm
Install Windows
Install SQL
Install SharePoint

Saturday, November 16, 2013

What are Crawled Properties, iFilters, and Connectors in SharePoint 2010?

This post lists links to various TechNet resources, along with a brief  regarding each resource:


Crawled Properties:  this page details the properties that are included in the index by default.  You can modify the default properties to provide a richer index that is targeted in relation to your objectives.

For example, is a person's work phone or job title part of the default content that is indexed from MySites?  check this page to find out.

http://technet.microsoft.com/en-us/library/hh134087(v=office.14).aspx

to change that, click on Metadata Properties off the Search Service Administration page, available by navigating to Application management > Manage Service Applications

Default iFilters:  this page details the file types that are supported by default. And, it lists whether the file types are included in the search administration file types page under the "file type included by default" column.  If you don't see your file type listed, (e.g. adobe acrobat pdf), you have to download and install the iFilter, an image file for the crawl server to use next to pdf's, and then register the iFilter in registry.

http://technet.microsoft.com/en-us/library/gg405170(v=office.14).aspx

Default connectors:  this page explains the various types of connectors that are supported out of the box.  Ever wonder what sps3 was for?  check out this page.

http://technet.microsoft.com/en-us/library/gg153530(v=office.14).aspx

Saturday, November 9, 2013

Move SharePoint Server IIS to a different drive

To move IIS to a different drive is a fairly straightforward procedure.

This blog - -> http://blogs.iis.net/thomad/archive/2008/02/10/moving-the-iis7-inetpub-directory-to-a-different-drive.aspx has detailed the steps very neatly.

In a nutshell, and to adapt them to a SharePoint install, here is what I recommend.

1. Run the SharePoint pre-requisite installer and say no to running the SharePoint products and Technologies Wizard.

2. Run the MoveIIS7root.bat from the site above

3. Use xcopy to copy all content to the new location

4. Verify that E:\inetpub was created, and verify ACL's and content with what is on C:\InetPub

5. navigate to HKLM\Software\Microsoft\InetSTP and make sure physical path to IIS is set to the path you selected when running MoveIIS7root.bat and verify that it does not contain two \\'s.  it should read e:\ not e:\\

6. Verify that you can delete the C:\InetPub folder, and if you can not, then take ownership starting at the deepest directories and work your way up to the C:\inetpub, deleting as you go.

7. Stop and start www service (sc stop w3svc, sc query w3svc, then after is stopped, sc start w3svc - or via services.msc)

8. Stop and start IIS admin service (sc stop iisadmin, sc query iisadmin, sc start iisadmin)

9. Restart server, make sure recovery settings for services are set to restart on failures
.
10. Continue with the SharePoint install by running the SharePoint Product and Technologies Wizard

Saturday, November 2, 2013

How to - IIS moving sites and applications

In this completely, hypothetical, situation, you are the web administrator for a website named ChiNet.  Chinet is an old, antiquated site, but you love it nonetheless and want to move it to a completely different server.  The URL to Chinet is http://chinet.yourdomain.com

1. Open inetmgr (iis manager)

2. Then right click on the web you want to move to another server, or right click on the entire server if you want

3. Click on deploy and if you dont see deploy, click here

4. Click on export application

5. Copy the zip file to your destination server

6. Make sure the physical path to your web exists, and any local users and groups exist, on the destination server (e.g. d:\inetpub\chihome\wwwroot  or whatever, and then the local users) - - this would be the relative same physical path where the site was stored, only now it is on the new server.

7. Open iis manager (inetmgr)

8. Create a new site that points to the physical path that you created in step 6

9. Right click on the site, click deploy, click import application

10. Navigate to the location where you placed the zip file

11. Place the contents of it in the root (watch this, it will try to double root you, maybe  chihome/chihome,   remove the second chihome)

12. Next through

13. Begin enjoying your website named chinet on the new server

14. Get the cname record in dns switched to point to this servers host name (A record)

Popular Posts