Monday, August 22, 2016

Start/Update Workflow for existing items in SharePoint List using PowerShell

The following script is useful to start/update workflow for existing items in SharePoint list.

#updated workflow

# URL of the Site
$web = Get-SPWeb -Identity "<<Site URL>>"

$manager = $web.Site.WorkFlowManager

# Name of the list
$list = $web.Lists["<< List Name>>"]

# Name of the Workflow
$assoc = $list.WorkflowAssociations.GetAssociationByName("<< Workflow Name>>","en-US")

$data = $assoc.AssociationData
$items = $list.Items
foreach($item in $items)
 {
 $wf = $manager.StartWorkFlow($item,$assoc,$data,$true)
 }

$manager.Dispose()
$web.Dispose()
#

Thursday, February 27, 2014

Installing the Reporting Service Add-in for SharePoint 2010


Installing the add-in before a SharePoint Product or Technology
The add-in must be installed on all servers that will run as SharePoint Web front-ends that you want integrated with the Reporting Services. If the SharePoint product or technology has not been installed yet, you can run the add-in installation wizard on all servers.
  1. Download the Setup program (rsSharepoint.msi) for the Reporting Services Add-in.
  2. As an administrator, run rsSharepoint.msi to run the Installation Wizard. The wizard displays a Welcome page, the Software license terms, and a registration information page. Setup creates SharePoint 2010 folders under %program files%\common files\Microsoft Shared\ and copies files to the folders. You must run the .msi as administrator by first opening an elevated command prompt window, and then running the rsSharepoint.msi from the command line.
  3. Configure the report server integration settings and feature activation in SharePoint Central Administration.
Installing the add-in after a SharePoint Product or Technology has been installed
When installing the add-in on servers after a SharePoint product or technology has been installed, you can run the full add-in installation on only one of the SharePoint servers. For the other SharePoint servers in the farm, you must run the files only installation of the add-in from the command line. The files-only installation installs the files but skips the custom actions section of the installation process.
After you have installed the add-in on all the servers, start SharePoint Central Administration to configure report server integration.
Files-only installation
To install the files but skip the custom action steps, run the .msi from the command line with the SKIPCA option:
  1. Open a command prompt with administrator permissions. 
  2. Run msiexec -i rsSharePoint.msi SKIPCA=1.
 
Two steps for a full installation of the add-in
If you get errors during installation, you can run Setup as a two-step process from the command line. First run Setup to install the files and skip the custom actions, and then run a custom actions executable. To install the Reporting Services Add-in for files-only mode, do the following:
  1. Open a command prompt with administrator permissions.
  2. Run msiexec -i rsSharePoint.msi SKIPCA=1.
  3. Find the rsCustomAction.exe file on the file system. This file is copied to your computer by the Setup program. The file will be located in the %Temp% directory.
To get the path information for this file, click Start, click Run, and then type %temp%. The file should be located in \Documents and Settings\<your name>\LOCALS~1\Temp.
Open a command prompt window. To do this, click Start, click Run, and type cmd. On newer operating systems, you might need to elevate your permissions and run this run this with administrator permission.
  1. Navigate to the folder that contains the rsCustomAction executable.
  2. Enter the following command. This configuration step will take several minutes to finish. The W3SVC service will be restarted during this process.
6.  rsCustomAction.exe /i