Install the State Service Via PowerShell

The next step for configuring your SharePoint 2010 Farm via PowerShell is to install the State Service.  Unless you run the SharePoint Wizards, the only way to configure this service is through PowerShell.  This script is pretty easy to understand in that it is only 3 actual lines of PowerShell.  Here is the script in it’s entirety.  Again, I will explain what is going on below.

1 function Install-SPStateService 2 { 3 <# 4 .DESCRIPTION 5 Install-StateService creates the State Service on your SharePoint 2010 Farm. 6 7 .SYNOPSIS 8 Provision the State Service. 9 10 .EXAMPLE 11 Install-StateService -ServiceName "SharePoint_State_Service" -ServiceProxy "SharePoint_State_Proxy" 12 Creates the State Service on your SharePoint 2010 Farm using the specified Service information 13 14 .EXAMPLE 15 Install-StateService 16 Creates the State Service on your SharePoint 2010 Farm using the default settings. 17 The default settings include ServiceName = SharePoint_State_Service and ServiceAcct = SharePoint_State_Proxy 18 19 .LINK 20 http://woodssharepoint.wordpress.com/ 21 #> 22 23 Param( 24 [string]$ServiceName = "SharePoint_State_Service", 25 [string]$ServiceProxy = "SharePoint_State_Proxy" 26 ) #End Param 27 28 $serviceApp = New-SPStateServiceApplication -Name $ServiceName 29 New-SPStateServiceDatabase -Name $ServiceName -ServiceApplication $serviceApp 30 New-SPStateServiceApplicationProxy -Name $ServiceProxy -ServiceApplication $serviceApp -DefaultProxyGroup 31 }

Lines 3 – 21 give the basic Description and Help information for the script.  Lines 23 – 26 are the parameters for the script.  You will need to have the Service Name and Proxy for the State Service. 

Line 28 creates the State Service Application using the $ServiceName parameter.  Line 29 creates the database for the State Service Application. I am taking the name of the Service and setting the database to that same name.  You could add another parameter for the Database Name and change the –Name part of the line to specify another name for the database.  The other required Parameter is the ServiceApplication, which you created in the previous line.  Finally line 30 creates the proxy for the State Service.  This line sets the name of the proxy, the Service Application for the proxy and also sets the proxy to be a part of the Default Proxy Group.

Posted in PowerShell, SharePoint 2010 | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Configure The SharePoint 2010 Farm via PowerShell

I have found that using PowerShell to configure SharePoint 2010 really is the easiest and probably most convenient way to do so.  I have also found that by using either of the SharePoint 2010 wizard (Configuration Wizard and SharePoint 2010 Products Configuration Wizard) you don’t get very many options when choosing the Service Database names, Content Database Names, Service Database Names, Service Names, SharePoint sites, I could go on, but why.  So, why not figure out how to setup an entire SharePoint 2010 farm using PowerShell.  Starting with my last post on Registering Managed Accounts via PowerShell, I am going to go through the scripts that I used to do just that.  I will also be posting these script to The Scripting Guy’s Script Repository under the SharePoint – Deployment and Upgrade section.

Topics:

  • Install-SPFarm
  • Register-SPManagedAccounts
  • Install-SPStateService
  • Setup Developer Dashboard
  • Install-SPAccessService
  • Install-SPBDCService
  • Install-SPWordViewingService
  • Install-SPWordAutomationService
  • Install-SPExcelService
  • Install-SPMetaDataService
  • Configure Object Cache Accounts
  • Install-SPPerformancePointService
  • Install-SPPowerPivotService
  • Install-SPPowerPointService
  • Install-SPSearch
  • Install-SPSecureStoreService
  • Install-SPVisioService
  • Install-SPWebAnalyticsService
  • Install-SPUserProfileService
  • New-SPWebApp
  • New-SPSiteCollection
Posted in PowerShell, SharePoint 2010 | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

Register Managed Accounts Via PowerShell

This blog is a follow up of Todd Klindt’s blog post Using PowerShell to set up a test environment.  I also want to thank Gary LaPointe for his blog post Service Accounts and Managed Service Accounts in SharePoint 2010.  I thought that using a PowerShell script to import a list of users into AD was a great way to quickly add the service accounts for SharePoint 2010.  As a follow up, I wanted to add all of the service accounts from that CSV file into the Managed Accounts area of SharePoint 2010.  Below is the PowerShell script/command that I created to do just that:

function Register-ManagedAccounts
{
    Import-CSV .\serviceusers.csv | FOREACH-OBJECT `
    {
        $account = New-Object System.Management.Automation.PSCredential $_.Name, `
            (ConvertTo-SecureString “P’@’$’$word” –AsPlainText –Force)
        $managedAccount = New-SPManagedAccount $account
    } #END FOREACH-OBJECT
} #END FUNCTION

Basically, I am stepping through each of the lines in the CSV file, creating a credential for each account, then adding it to the managed accounts in SharePoint.  I wouldn’t use this script in a production environment mainly because the Password is hard-coded into the script.  There may be a way to put the password into the ServiceUser.CSV file and pull it from there.  I am also thinking about adding an IF statement to check if the account in the CSV file should be added to the managed accounts area.  I would add another column for ManageAccount and have a flag there to compare.

Posted in PowerShell, SharePoint 2010 | Tagged , | 2 Comments

Integrating SQL Reporting Services with SharePoint 2007

This is a repost from a previous blog that I did last year.  I have migrated my blog from Microsoft Live Spaces to WordPress and figured that it would be better to move this over as well.  Especially since I am currently working with a company to configure SSRS integration into SharePoint 2007

I have found that a lot of people have issues trying to integrate SharePoint and SQL Reporting Services.  This blog post will show you the way to successfully install SQL Reporting Services Add-on for SharePoint. 

Pre-requisites:

  1. SQL Server 2008 is installed without Reporting Services
  2. Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007 is installed

Quick Steps:

  1. Download rsSharePoint_x64 or rsSharePoint (x86) (If you are still using an x86 platform, why? didn’t you know that the next version of SharePoint requires x64? It’s time to upgrade!)
  2. Install Reporting Services on the Web Front End(s) of your SharePoint Environment
  3. Install rsSharePoint_x64
  4. Configure SharePoint Central Admin
  5. Enable the Reporting Services Feature on the Site Collection
  6. Create Reports
  7. Publish to Library in SharePoint

More Details:

Downloading rsSharePoint_x64:

  1. The best way to find the download is to do a BING search (Yeah, I drink the Microsoft Kool-Aid), or click this link to go directly to the site for SQL Server 2008.
    1. Search on SQL Reporting Services Add-In for SharePoint
    2. Look for the Add-in that goes with your version of SQL Server (2008 or 2005)
  2. Scroll down until you find the download section and download the correct version for your platform

Installing Reporting Services (SSRS) on the Web Front End(s) (WFE’s) of your SharePoint Environment:

Yup, that’s right, install SSRS on the WFE’s.  You have to have them there so that SharePoint recognizes that SSRS is installed.  No, I don’t know why… just do it.  When you install SSRS on the WFE, it should tell you that you have to configure SSRS after install.  This is perfect, if it doesn’t, select that option anyway, it makes configuration easier. 

After install run the Reporting Services Configuration Manager – Click Connect

  1. Go to the Web Service URL section, change the settings to what you want and click Apply – The URL will turn into a link-able URL instead of being grayed out
  2. Go to the Database section, click Change Database, Create a new report server database (Next), Create Connection to your backend SQL Server (Test Connection, and Next), Create the Database Name and BE SURE TO SELECT SHAREPOINT INTEGRATED MODE here (Next), If you want different credentials for SSRS change them in the Credentials (Next), Review your selections (Next), You should have 6 success messages (Finish)
  3. Go to Report Manager URL section, change the setting to what you want and click Apply – The URL will turn into a link-able URL instead of being grayed out
  4. Finish out the configuration as you see fit, the rest does not matter for this article
  5. When done, click Exit

Installing rsSharePoint (SQL Reporting Services Add-in for SharePoint)

  1. Open a command prompt
  2. Change Directory to where you downloaded the rsSharePoint file
  3. run rsSharePoint_x64.msi SKIPCA=1 or rsSharePoint.msi SKIPCA=1
    1. This will run the add-in in Files only mode, which copies the files to your temp directory
  4. Change Directory to the temp directory (cd %temp%)
  5. run rsCustomAction.exe /i
    1. this installs the features for SharePoint
  6. After it completes, you will see a new section in Central Administration – Application Management called Reporting Services

Configuring SharePoint Central Administration

  1. Go to SharePoint Central Administration – Operations tab
    1. Click Update farm administrator’s group
    2. Add the SSRS Service account
  2. Go to SharePoint Central Administration – Application Management tab
  3. Click Grant Database Access
    1. Select the Server Name
    2. Select the Instance
    3. Click OK
    4. Enter in the User name a password for the SSRS service account
    5. Click Cancel
  4. Click Reporting Services Integration
    1. Enter in the Report Server Web Service URL that you configured in the Installing SSRS on the Web Front End section
    2. Choose the Authentication Mode (Windows Authentication or Trusted Account)
    3. Click OK
  5. Set Server Defaults – You can go change this stuff if you want, I didn’t.
    1. Report History Defaults
    2. Report Processing Timeout
    3. Report Processing Log
    4. Enable Windows Integrated Security 
    5. Enable Ad Hoc Reporting
    6. Custom Report Builder launch URL

Enable the Reporting Services Feature on the Site Collection

  1. Go to your site’s Site Settings
  2. Under Site Collection Administration choose Site collection features
  3. Find the feature called Report Server Integration Feature and Activate it
  4. You will now have the Report Server Web Part enabled

Create your report using Visual Studio.  When you are about to publish, go into the properties of the project

  1. TargetDataSourceFolder – change to your SharePoint site document library (example: http://sharepoint/reports/documents)
  2. TargetReportFolder – change to your SharePoint site document library (example: http://sharepoint/reports/documents)
  3. TargetServerUrl – change to your SharePoint site (example: http://sharepoint)

Viola – You are done!  Good Luck and Keep Pointing that Share around!

Posted in Reporting Services, SharePoint 2007, SQL | Tagged , , | Leave a comment