• SharePoint 2013 Prerequisites fails with MSI Installer error code 1603 while installing AppFabric 1.1

    When installing SharePoint 2013 prerequisites on Windows Server 2008 R2, the prerequisite installer fails with the following error

    Appfabric installation failed because installer MSI returned with error code:1603

    This is a generic MSI error message and does not give any indication about how to get the issue fixed. Uninstall or reinstalling only makes it worse.

    The issue can be caused due to the following:

    1. The path to the PowerShell executable that is needed for the AppFabric installation is incorrect.
    2. In some scenarios, repeated uninstallation and re-installation does not fix the issue. This is because the installer does not remove the PSModulePath entry in Environment Variables during un-installation and the installation fails because the entry already exists.
    3. If you are trying to install all the prerequisites manually as the server does not have a connection to internet.

      Note
      : Appfabric installation and configuration has to be done by the prerequisite installer ONLY and not in a stand-alone manner.

    You can implement any one of the two solutions listed below

    1. Solution 1

      Append the following path to PSModulePath entry in the environment variables - %SYSTEMROOT%\System32\WindowsPowerShell\v1.0

      • Go to My Computer, right-click Properties
      • On the System' page, click Advanced System Settings on the left-side pane.
      • If you receive a UAC prompt, click on Yes to launch the System Properties dialog box
      • From the Advanced tab, click Environment Variables
      • Within the System Variables section in the lower half, select PSModulePath and click on Edit (or double-click PSModulePath')
      • Append the following path to PSModulePath entry in the environment variables

      %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

      • Ensure that the PSModulePath entry looks like this:

        C:\Windows\system32\WindowsPowerShell\v1.0\Modules\;c:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules


    2. Solution 2

      • There are chances that other applications might be referencing the same variable and may fail if it is deleted. This is what we can do if solution 1 does not help.
      • Remove the PSModulePath entry from the 'Environment Variables' and re-run the installer. Once it completes successfully, ensure that the PSModulePath entry looks the same as mentioned in solution 1.
    3. Solution 3

    You can download the list of prerequisites from Links to applicable software

    Links to the individual prerequisites:

    The steps listed below are for AppFabric for Windows Server only

    Follow these steps for installing AppFabric for Windows Server correctly

    • Uninstall the Appfabric for Windows Server from Control Panel -> Programs and Features page
    • Download the individual requirements to a network location or a local folder
    • Install prerequisites for SharePoint 2013 manually
    • From the Start menu, open the Command Prompt window using the Run as administrator option.

      - Navigate to the root of the SharePoint 2013 installation media or folder location
      - Type the prerequisite program switch and corresponding argument for the program that you want to install, and then press ENTER.
      For example:

      If
      we have to install AppFabric for Windows Server from a local source, we can run the following command:

      PrerequisiteInstaller.exe /AppFabric:<location Of the Appfabric installation file>

      This will kick off the prerequisite installer wizard which will then use the installation file stored locally on the machine as specified in the command-line to install Windows Server AppFabric. We can also install more than one prerequisite by using different switches with the PrerequisiteInstaller.exe command to install multiple components and specifying the installation path in the command line window. For example:

      PrerequisiteInstaller.exe /AppFabric:<location Of the Appfabric installation file> /IDFX11:<Install Windows Identity Foundation v1.1 from file>

      This command will install Appfabric and Windows Identity Foundation

      For a complete list of prerequisite installer operations and command-line options, see Prerequisite installer operations and command-line options

    • The SharePoint 2013 prerequisite installer (prerequisiteinstaller.exe) installs the following software, if it has not already been installed on the server, in this order (provided you have downloaded the prerequisites locally):

      PrerequisiteInstaller.exe

      /SQLNCli:file - Install Microsoft SQL Server 2008 R2 SP1 Native Client from file
      /PowerShell:file - Install Windows Management Framework 3.0 from file
      /NETFX:file - Install Microsoft .NET Framework 4.5 from file
      /IDFX:file - Install Windows Identity Foundation (KB974405) from file
      /Sync:file - Install Microsoft Sync Framework Runtime v1.0 SP1 (x64) from file

      /AppFabric:<location Of the Appfabric installation file>
      /IDFX11:"<path>\Microsoft Identity Extensions.msi"
      /MSIPCClient:"<path>\msipc.msi"
      /WCFDataServices:"<path>\WcfDataServices.exe"
      /KB2671763:"<path>\AppFabric1.1-RTM-KB2671763-x64-ENU.exe

    • where "<file>" signifies the file location from where you want to install. If you do not specify the <file> option, the installer downloads the file from the Internet and installs it.

    The prerequisite installer creates log files at %TEMP%\prerequisiteinstaller.<date>.<time>.log. You can check these log files for specific details about all changes the installer makes to the server.

    See Install prerequisites for SharePoint 2013 from a network share for information about how to install the SharePoint 2013 prerequisites at the command prompt from a network share or local system. This approach is typically used when the server does not have a connection to internet.

  • Event ID 8311, certificate validation errors in MSS 2010

    Issue

    In Microsoft SharePoint Foundation 2010 or Microsoft SharePoint Server 2010, you see the following error getting logged in the Application Event Log:

              

    Log Name       :  Application

    Source           :  Microsoft-SharePoint Products-SharePoint Foundation

    Event ID         :  8311

    Task Category :  Topology

    Level              :  Error

    Description      : 

     

     

    An operation failed because the following certificate has validation errors:\n\n Subject Name: CN=SharePoint Security Token Service, OU=SharePoint, O=Microsoft, C=US \n Issuer Name: CN=SharePoint Root Authority, OU=SharePoint, O=Microsoft, C=US\nThumbprint: 7884622F8B800E7AFAAFD3DDF98BE8AC96D4F952\n\n

    Errors:\n\n The root of the certificate chain is not a trusted root authority.

    Additionally, other areas such as search, claims authentication also do not function correctly.

    CAUSE

    This problem occurs when an administrator deletes the "local" trust relationship of the farm from the "Security" section of the Central Administration web site (Central Administration > Security > Manage Trust)

    RESOLUTION

    It looks like the root certificate for STS is missing from the SharePoint certificate store. As a result, claims authentication in the environment may totally broken. You will need to export the certificate from the certificate store on the local computer and add it to the SharePoint certificate store. Use the certificate thumb print from the event log to locate the certificate that needs to be added.

    In order to resolve this problem, the local trust relationship has to be created. This can be done using PowerShell commands or from the Central Admin site.

    PowerShell

              

    $rootCert = (Get-SPCertificateAuthority).RootCertificate

    New-SPTrustedRootAuthority -Name "localNew" -Certificate $rootCert

    After running the above commands, perform an IISReset on all servers in the farm.

    Alternate Method (Central Administration site)

    1. Export the certificate from the Computer’s certificate store 
    1. Log on to the SharePoint server where you are seeing the certificate errors
    2. Open Start à Run, type in “mmc”  and hit “Ok”
    3. From the file menu, choose “Add/Remove Snap-in”
    4. Double click “Certificates”
    1. Select “Computer account” and walk through the rest of the wizard. Make sure you select “Local Computer”
    1. Hit Finish and then “OK”
    1. Go to “Certificates” à SharePoint à Certificates
    1. Double click on each of the three certificates and look at their thumbprint (details tab). If the thumb print of the certificate matches the thumb print from the event log, this is the certificate you want to export
    2. Export the certificate (right click, All Tasks à Export). Leave all default options selected and save it to the desktop.

     

    2.  Add the certificate to the SharePoint certificate store

              
    1. Go to Central Admin à Security à Manage Trust.
    1. Click on “New”.
    1. Specify any appropriate name, and select the certificate you exported earlier.
    2. Click OK.

    After running the above commands, perform an IISReset on all servers in the farm.

  • Usage Reporting in SharePoint (WSS or MOSS)

     

    SharePoint (WSS or MOSS) have built-in usage reporting feature. Usage reporting is a service that enables site administrators, site collection administrators, and Shared Services Provider (SSP) administrators to monitor statistics about the use of their sites. Usage reporting also includes usage reporting for search queries that can be viewed by SSP administrators for search and site collection administrators.

    Usage reporting is very useful for managing complex site hierarchies with many sites, a large number of page hits, and a large number of search queries, and it is recommended that the service be enabled for deployments of complex site hierarchies.

    To configure usage reporting, a farm administrator must first enable Windows SharePoint Services usage logging for the farm that hosts the Web application containing the SSP. The SSP administrator enables and configures the usage reporting service. Then, site collection administrators can activate the 'reporting feature' to enable usage reports on the site collection.

    After usage reporting is enabled, site administrators and site collection administrators can view site usage summary pages that have the following information for their sites and site collections (SpUsageSite.aspx):

    • Requests and queries in the last day and the last 30 days.
    • Average number of requests per day over the last 30 days.
    • A chart of requests per day over the last 30 days.
    • A list of the top page requests over the last 30 days.
    • A list of top users over the last 30 days.
    • A chart of top referring hosts over the last 30 days.
    • A chart of top referring pages over the last 30 days.
    • A list of top destination pages over the last 30 days.
    • Top queries for the last 30 days (if search usage reporting is enabled).
    • Search results top destination pages (if search usage reporting is enabled).

    SSP administrators for the search service can view a search usage reports page that tracks the following information (SpUsageSiteSearchQueries.aspx)

    • Number of queries per day over the previous 30 days.
    • Number of queries per month over the previous 12 months.
    • Top queries over the previous 30 days.
    • Top site collections originating queries over the previous 30 days.
    • Queries per search scope over the previous 30 days.

    Site collection administrators for the SSP site can view a usage summary page that tracks the following information (usage.aspx)

    • Total amount of storage used by the site collection.
    • Percent of storage space used by Web Discussions.
    • Maximum storage space allowed.
    • Number of users for all sites in the hierarchy.
    • Total hits and recent bandwidth usage across all sites.

    Windows SharePoint Services (WSS) 3.0 provides the most basic of reports which are primarily text-based. Site collection administrators can also view a site usage report that includes monthly and daily page hit totals filtered by the following criteria

       - Page
       - User
      -  Operating system
      -  Browser
      -  Referrer URL

    Enable Windows SharePoint Services Usage Logging

    Enable Windows SharePoint Services usage logging for the farm hosting the Web application. Please refer the following steps to enable usage logging for the farm:

    • On the Central Administration home page, click Operations.
    • On the Operations page, in the ‘Logging and Reporting’ section, click ‘Usage analysis processing’.
    • On the ‘Usage Analysis Processing’ page, in the ‘Logging Settings’ section, select ‘Enable logging’.
    • Type a log file location (by default it is set to ' <%Program Files%\Common Files\Microsoft Shared\Web Server Extensions\12\logs> ' folder) and number of log files to create.
    • In the ‘Processing Settings’ section, select ‘Enable usage analysis processing’, and then select a time to run usage processing.
    • Click OK.

    Enable Office SharePoint Usage Reporting

    After Windows SharePoint Services usage logging is enabled in the server farm, SSP administrators must enable the Office SharePoint Usage Reporting service. SSP administrators can control the complexity of usage analysis processing, and select whether or not reporting is enabled for search queries. Please refer the following steps to enable portal usage reporting:

    • On Central Administration home page, click the Shared Service Provider listed under Shared Services Administration in the Quick Launch bar.
    • On the SSP home page, in the Office SharePoint Usage Reporting section, click Usage reporting.
    • On the Configure Advanced Usage Analysis Processing page, in the Processing Settings section, click Enable advanced usage analysis processing.
    • In the Search Query Logging section, select Enable search query logging.
    • Click OK.

    Note:  If advanced usage analysis processing is not selected, usage reporting statistics will be minimal.

    Reset Internet Information Server

    • Go to the Start button and click Run
    • Type IISReset and click OK.

    Activate Office SharePoint Usage Reporting

    After Office SharePoint Usage Reporting is enabled for the SSP, site collection administrators must activate the reporting feature. Until the reporting feature is activated on a site collection, usage reports are not available.

    Please refer the following steps to activate the reporting feature:

    • On the Site Actions menu, click Site Settings.
    • On the Site Settings page, in the Site Collection Administration section, click Site collection features.
    • On the Site Collection Features page, click the Activate button for the Reporting feature.

    Note: You must enable Office SharePoint Server Standard Site Collection Features for reporting to work.

    How this data makes it back to DB, differs for WSS and MOSS

    • In WSS, a timer job called Usage Analysis, runs on each WFE and is then responsible for parsing the usage files and updating the appropriate information for each site’s content DB.
    • In MOSS, a timer job called Office SharePoint Usage Analytics Log Import, runs on each WFE and is responsible for parsing the usage files and uploading this data in the SSP DB

    More Information

    Whenever Usage Analysis is enabled, the Web Application Servers begin creating usage analysis logs in the ' <Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Logs> ' path. There will be a separate folder named with a GUID that represents the web application. Within each of these folders will be a subfolder for each days logs which in turn contains usage logs in the format 01.log, 02.log etc. The usage analysis job runs against the data collected from the previous day(s) logs. For this reason running the Usage Analysis job more than once per day will not update usage data.

    -  On a high level, this is how the usage reports are generated

    • IIS keeps all the SharePoint usage records in memory and will only dump it into physical file (the usage log) when memory is full or IISRESET
    • By default, MOSS has daily timer job (Office SharePoint Usage Analytics Log Import ) to process these physical files into database's temp usage tables
    • Be default, MOSS has another hourly or minutely timer job (Office SharePoint Usage Analytics Processing) that process data in those temp/shadow tables into the real usage tables.
    • Once this is completed, usage report would then be available for viewing.

    WSS 3.0 inserts an ampersand (&) between the top-level site URL and the sub site URL when it processes the log files. This marks the log file as "processed" and prevents data from being counted twice if the usage processing job is accidentally run again on the same day. If the connection is located in this file and has the ampersand (&), you will see it reflected in the usage data.

    In MOSS, the two important timer jobs which are responsible for parsing, processing and updating the SSP DB (the ANL tables) are

    Office SharePoint Usage Analytics Log Import’ and 'SharePoint Usage Analytics Log processing'.

    These jobs run on each WFE in the farm on a daily basis to process the data in the shadow tables and write the final usage data into another set of tables like ANLHit.

    Office SharePoint Usage Analytics Log Import’ job is responsible for parsing and populating the usage report data in the SSP DB’s analytics tables (that use the ANL prefix) and runs daily to pick up yesterday and only yesterday’s usage log files and parse them into the SSP table like 'ANLShadowHit' while 'SharePoint Usage Analytics Log Processing' job runs on hourly or minutely basis to process the data in the above shadow tables and write the final usage data into another set of tables like ANLHit.

    The following categories are the most relevant for usage reports

    • Office SharePoint Usage Analytics Processing
    • Office SharePoint Usage Analytics Log Import
    • Microsoft.SharePoint.Administration.SPUsageAnalysisJobDefinition
    • Microsoft.SharePoint.Portal.Analytics.UsageProcessingJobDefinition
    • Microsoft.SharePoint.Portal.Analytics.LogImportJobDefinition

    Report pages

    The http://_layouts/usageDetails.aspx even shows you the total hits for the documents which are very useful information.

    Names of the application pages in the '_layouts' directory which show usage analysis data

    • usage.aspx
    • usageDetails.aspx
    • SpUsageSite.aspx
    • SpUsageWeb.aspx
    • SpUsageSiteQueries.aspx
    • SpUsageSiteResults.aspx

    All of these pages reside in the ‘_layouts’ folder of the site. Now, the information in the "Advanced" reports (SPUsageSite.aspx) isn't exactly the same as that in the basic WSS reports (usageDetails.aspx).

    5u0agfed


    MOSS Usage Reports explained provides a very good insight into the kind the data for each parameter in the Site Collection Usage Summary page.

    Mark Arend has written an excellent post with detailed descriptions of parameters displayed in MOSS 2007’s usage reports on the pages like SpUsageWeb.aspx (Site), SpUsageSite.aspx (Site Collection), SpUsageWebTopPages.aspx (Site), SpUsageSiteTopPages.aspx (Site Collection) and so on.

    There are two report pages that are extremely useful, particularly for slightly smaller sites, that cannot be reached through the GUI interface in MOSS 2007. They are actually from the basic WSS system, and MOSS inexplicably misses out any direct reference though the administration pages.

    • /layouts/usage.aspx                  This page brings data from the content database, which is the total hit for the page from ALL locations
    • /_layouts/usageDetails.aspx-  This URL brings data from ‘ SharedServices_DB ‘, which is processed thru multiple SQL table views and stored. It results only the hits to the page FROM A specific site collection.

    In short, the data on the ‘usagedetails.aspx’ page is calculated for any hit (success or failure) to the location whereas the data in the ‘spUsageSite.aspx’ page shows the page which was accessed (and the number of times it was access in the Pie chart) FROM the site collection.

    These are the definitions used by WSS and MOSS in summary usage reports (which are stored in the web metainfo):

    1. Visit:         a “total hit” that does not come from within the same server; that is, it either has no Referrer header, or it has a Referrer header from   
      another server
    2. Total hit: any hit that gets logged in the WSS http logs (we don’t log hits that result in error http results, or hits to the _layouts directory)
    3. Hit:           anything in (2) except hits on files with these extensions: "gif","jpg","png","bmp","css","mid","wav","ico","xml","au","js","class"
    4. Request:  Requests always measures Page Views, not all HTTP requests for individual items like images, style sheets, etc.

    How Usage Analysis works

    All WFEs behave in the same way as long as the Windows SharePoint Web Services service is running on each WFE. HTTP data from each WFE is collected and stored locally on disk. The method and process by which this data is persisted on disk is described in Usage Event Logging in Windows SharePoint Services 3.0. This behavior is the same for all WFEs.

    How this data makes it back to DB, differs for WSS and MOSS


       In WSS, a timer job called Usage Analysis, runs on each WFE and is responsible for parsing the usage log files and updating the information in the site’s content DB. 
        In MOSS, a timer job called Office SharePoint Usage Analytics Log Import, runs on each WFE and is responsible for parsing the usage log files and uploading this data in the SSP DB (for SSP’s that have usage turned on, as per the instructions that you quote below)

    • The Office SharePoint Usage Analytics Log Processing job is responsible for parsing and populating the usage report data in the SSP DB’s analytics tables (that use the ANL prefix)
    • It runs every 15 mins, to check is there’s new data imported (from the Office SharePoint Usage Analytics Log Import job) so that the reports are updated
    • It also expires detailed data (kept only for 30 days) and report data (kept for 365 days)
    • Windows SharePoint Services 3.0 generates usage event logs daily for each Web application when 'Enable logging' is selected on the Usage Analysis Processing page in SharePoint Central Administration
    • When logging is enabled, Windows SharePoint Services by default creates log files in the 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Logs' path on the front-end Web server, although you can specify an alternative location
    • The Logs directory contains a folder for each Web application on the Web server, each named with a GUID that identifies the respective Web application
    • Windows SharePoint Services 3.0 inserts an ampersand (&) between the top-level site URL and the sub site URL when it processes the log files
    • This marks the log file as "processed" and prevents data from being counted twice if the usage processing job is accidentally run again on the same day

    If the connection is located in this file and has the ampersand (&) you will see it reflected in the usage data.

    • By default log files will be created under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Logs. In side this folder, there would be a folder for each web application named as GUID of respective web application and inside it, folder for each day.
    • The log file location can be customized through Central Administration, Operations, Usage Analysis Processing. However its mandatory that WSS_WPG user group Read, Write, and Update permissions to the directory. Without it, log files will not be processed.

    The default page for usage reporting has the most reporting parts; each part executes at least one stored procedure to retrieve its data. Each part is also found on other reporting pages.

    • Site summary
    • Top Pages (Average requests per day over past 30 days)        http://<WebUrl>/_layouts/SpUsageWebTopPages.aspx
    • Top Users (Average requests per day over past 30 days)         http://<WebUrl>/_layouts/SpUsageWebUsers.aspx
    • Top referring pages (past 30 days)                                              http://<WebUrl>/_layouts/SpUsageWebReferrers.aspx
    • Top referring hosts (past 30 days)                                               http://<WebUrl>/_layouts/SpUsageWebReferrers.aspx
    • Requests per day (past 30 days)                                                   http://<WebUrl>/_layouts/SpUsageWebTopPages.aspx

    Who can view these Reports

    Site Collection Admins or users will Full Control permissions can view Site Collection and Site Usage Reports.  So if you want other users to access these reports you can do the following:

    • Create a custom site permission level and select the “View Usage Data” check box
      Note: this will also select the “View Pages” permission
    • Create a new Group called something like “Usage Report Viewers” and assign the permission level you created above to the group
    • Add the people you want to view the reports
    • Provide the users with links to the report pages.

    You can also use a web part to display the links and above and audience targeting so only the users in the SharePoint group “Usage Report Viewers” see the web part.

    FAQs (A few common questions regarding usage reports)

    • Is it possible to report on the Usage Analysis data for more than 30 days?
      - Yes
    • After 30 days, where does the data go? Does it get purged?

    - The data is kept in two spots. One is on the file system where you specified the logs to be kept. The second is in the database.
    - The data is not discarded, it is still kept in the database and on the file system unless you attempt to remove it.

    • If the data still exists after 30 days, is there a way to report on this?
      - Out of Box there is no option for this; however it is possible to pull up Usage Analysis reports past 30 days with SharePoint Designer.
      - The reason it is limited to 30 days is because any query that pulls the data for a period of more than 30 days through SharePoint, can cause a
         performance hit as it will task the SQL Server while attempting to pull this information.
    • If there any documentation available that could be provided to our developers.
      - If the developers are looking for the specific tables being used for this process, it would be referenced in the SharePoint Software Development Kit.

    Here are the direct links to the SharePoint SDKs:

    - WSS 3.0 :       http://msdn.microsoft.com/en-us/library/ms441339.aspx
    - MOSS 2007:  http://msdn.microsoft.com/en-us/library/ms550992.aspx


    References

  • Fantastic 40 Application Templates for SharePoint (WSS & MOSS)

     

    What are Application templates

    Application templates are out-of-the-box custom scenarios which are developed to address the needs and requirements of specific business processes or sets of tasks as in they can be used to create a dedicated site or workspace for a particular business process or task.

    Application templates in WSS and MOSS are separated into two group of templates; Server Admin Templates and Site Admin Templates.

    Server Admin Application Templates

    These are created as site definitions and require administrator permissions on the server to install. Below is a list of these 20 templates with a brief description of their purpose.

     

    1. Absence Request and Vacation Schedule Management
      A site for teams to share information on when team members will be away from the office and who to contact for issues.
    2. Help Desk
      A site for teams to submit and manage customer support issues.  It provides lists to track service request history and includes a knowledge base.
    3. Budgeting and Tracking Multiple Projects
      A site for teams to track multiple projects.  It provides lists to track general project information, project tasks, and project issues.
    4. Inventory Tracking
      A site to track inventory items, levels, sales, and orders.
    5. Bug Database
      A site for teams to track bugs in their shared software projects.
    6. IT Team Workspace
      A site for an IT team site to manage incoming issues, projects, and bugs.
    7. Call Center
      A site for teams to track customer support calls.  It provides lists to track customers, service request history and includes a knowledge base.
    8. Job Requisition and Interview Management
      A site for teams to manage their job requisitions, candidates, and interviews.
    9. Change Request Management
      A site for teams to track change requests in multiple projects.  It provides lists to track change requests, general project information, project tasks, project issues, and project risks.
    10. Knowledge Base
      A site to manage and create knowledge assets within an organization.
    11. Compliance Process Support Site
      A site for teams to help plan compliance processes.
    12. Lending Library
      A site to track the assets of a team lending library.
    13. Contacts Management
      A site for teams to track their shared contacts.
    14. Physical Asset Tracking and Management
      A site for teams to track their existing physical assets and manage the process of proposing new assets.
    15. Document Library and Review
      A site for teams to store documents and provide feedback on a per-version basis.
    16. Project Tracking Workspace
      A site that supports team collaboration on projects.  This site includes Project Documents, Project Issues, Project Risks, and Project Deliverables lists which may be linked to tasks in Microsoft Office Project Server 2007.
    17. Event Planning
      A site for teams to plan and manage events like conferences.
    18. Room and Equipment Reservations
      A site for teams to manage the use of shared rooms and equipment.
    19. Expense Reimbursement and Approval Site
      A site for teams to submit and manage expense reports.
    20. Sales Lead Pipeline
      A site for sales teams to track contacts, accounts, leads, and opportunities.

     

    Note: To install or remove a server admin template, you must have Administrator rights to both the Windows SharePoint 

              Services site and to the root of the server on which it is to be installed or removed.

      Installation and removal are done via the 'Stsadm.exe' command-line utility located at

      '%PROGRAMFILES%\Common files\Microsoft Shared\Web Server Extensions\12\Bin'
     

    Site Admin Templates

    These are custom templates which can be installed by individual site administrators in a template gallery without requiring farm administration access. Below is a list of these 20 templates
       

    1.      Board of Directors

    The Board of Directors application template provides a single location for an external group of members to store and locate common documents such as quarterly reviews, shareholder meeting notes and annual strategy documents. The template also tracks tasks, issues and calendar items so board members have a single location to view information relevant to them

    2.      Business Performance Rating
    The Business Performance Reporting application template helps organization managers track the satisfaction of customers through a combination of surveys and discussions. Surveys can be sent via Office InfoPath 2007 which are then consolidated by the template to give an overall response to a series of questions.

     

    3.      Case Management for Government Agencies

    The Case Management for Government Agencies application template helps case managers track the status and tasks required to complete their work. When a case is created, standard tasks and documents are created which are modified based on the work each case manager has completed.

     

    4.      Classroom Management
    The Classroom Management application template helps instructors and students organize and store information related to a particular class. The site includes document libraries to store assignments and lecture notes as well as calendars and announcement capability to enable communication from instructor to students.

     

    5.      Clinical Trial Initiation and Management
    The Clinical Trial Initiation and Management application template helps teams manage the process of tracking clinical trial protocols, objective setting, subject selection and budget activities. The site provides useful Office Word 2007 templates as well as the capability to create, track and assign tasks and issues related to a particular clinical trial.

     

    6.      Competitive Analysis Site
    The Competitive Analysis Site application template helps teams organize information about competitors and their products. The site provides useful Microsoft Office 2007 documents to perform SWOT and other useful competitive analysis techniques. Links to industry, company and product news can also be included to provide a single location for all competitive information.

     

    7.      Discussion Database
    The Discussion Database application template provides a location where team members can create and reply to discussion topics. Discussions are organized by categories, which are created by a site manager, and can be linked to Office Outlook 2007 via an RSS feed.

    8.      Disputed Invoice Management
    The Disputed Invoice Management application template helps accounts payable departments track open invoices including the potential savings associated with paying the invoice early. The site includes useful templates for analyzing the reasons invoices are being disputed as well as tracking who to contact for more information.

     

    9.      Employee Activities Site
    The Employee Activities Site application template helps manage the creation and attendance of events for employees. Activity owners use the site to review proposals for new activities and create event calendar items. Employees use the site to sign up as well as track which activities they’ve attended in the past.

     

    10.  Employee Self-Service Benefits
    The Employee Self-Service Benefits application template provides tools for an organization to inform employees about available benefits as well as enabling them to enroll for each benefit.

     

    11.  Employee Training Scheduling and Materials
    The Employee Training Scheduling and Materials application template helps instructors and employees manage courses and related materials. Instructors can use the site to add new courses and organize course materials. Employees use the site to schedule attendance at a course, track courses they've attended and to provide feedback.

     

    12.  Equity Research

    The Equity Research application template helps teams collaborate on researching stocks and other equities. It provides a central location for teams to store documents, post links, track news, and hold discussions related to the equities tracked by the site.

     

    13.  Integrated Marketing Campaign Tracking

    The Integrated Marketing Campaign Tracking application template helps marketing managers track the implementation and success of outbound marketing activities. The template allows a manager to create marketing activities and track the results of those activities, such as responses generated and sales completed. The template contains multiple methods of analyzing the success of the campaigns including automated calculations and Office Excel 2007 templates for more detailed analyses.

     

    14.  Manufacturing Process Management

    The Manufacturing Process Management application template helps teams to model and track manufacturing processes as well as tasks and issues that arise in the upkeep of these processes.

     

    15.  New Store Opening
    The New Store Opening application template helps a team manage the opening of new store locations or re-modeling of existing store location. The site provides a single location to manage tasks, issues, and documents for all store opening processes, enabling end users to view relevant information and providing project managers insight across the entire project.

     

    16.  Product and Marketing Requirements Planning

    The Product and Marketing Requirements Planning application template enables teams to manage the process of collecting and documenting requirements for new products. The site provides several Microsoft Office 2007 templates providing useful techniques for Marketing, Product and Steering committee actions as well as a template for meeting notes and financial information

     

    17.  Request for Proposal
    The Request for Proposal application template helps manage the process of creating and releasing an initial RFP, collecting submissions of proposals and formally accepting the selected proposal from amongst those submitted. The site also helps simplify the process of notifying individuals about the status of the RFP and submitted proposals.

     

    18.  Sports League
    The Sports League Site application template helps an intra-company league administrator manage a baseball league. The site tracks team information, players, captains and scheduled team activities such as games, practices and social events. Team members can enter in game results and perform analysis at a team, game or individual player level. The site also enables discussions between league members through a League Discussion board.


    19.  Team Work Site
    The Team Work Site application template provides a place where project teams can upload background documents, track scheduled calendar events and submit action items that result from team meetings. The site also tracks the creation and purpose of "sub-teams" as well as enables discussion of topics created by members of the team.

    20. Timecard Management
    The Timecard Management application template helps teams track hours spent working on various projects. The site enables team members to "punch in" on a particular project and "punch out" when they cease work. The system automatically generates the time worked by project, and can show managers who is working on a particular project, total hours versus budgeted time and the details of who worked on a each project entered into the site.

     

    Downloads

    • All 20 Site Admin templates                                                     (Available in English only)
    • All 20 Server Admin Templates                                                (Available in Multiple languages)

     

    Download the files and extract them to a folder on your local system say 'C:\Fab40' directory.

    Listed below are the steps to install and deploy the WSPs and STPs to your SharePoint farm. Additionally, you can use the  commands to create a batch file that will help you expedite the installation and deployment of Server Admin and Site Admin Templates.

    I have created a text file with the required set of commands for automating the installation and deployment of the templates. Change the file extension from ‘.txt’ to ‘.bat’ and then run the executable to complete the installation.

     

    Install the Application Template Core Solution

     

    1.      Before installing a server admin template, you must first download and install the Application Template Core solution called ApplicationTemplateCore.wsp.

    2.      After downloading the solution, double click on the 'exe' to extract the files to a location on the server; e.g. 'C:\Fab40'

    3.      Via command line, run "Stsadm -o addsolution -filename "C:\Fab40\ApplicationTemplateCore.wsp".

    4.      Next, run "Stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment -immediate".

    Note:

    Additional attributes may be required based on your Windows SharePoint Services configuration like
    Single Server:  [-local | -time <time to deploy at>]
    Farm              :  [-immediate | -time <time to deploy at>]

    To see the list of attributes, run Stsadm -help deploysolution or visit http://technet.microsoft.com/en-us/library/cc288449(office.12).aspx

     

    5.      Run ‘Stsadm -o copyappbincontent

    6.      To check the deployment status, browse to Central Administration > Operations tab > Solution management under Global Configuration. The solution(s) will be marked as Globally Deployed.

     

    Install a template

     

    1.      Download the template you want to install to the server.

    2.      Double-click the .exe file to extract the files to a location on the server; e.g. 'C:\Fab40' .

    3.      Via command line, run "Stsadm -o addsolution -filename "C:\Fab40\\<template_name>.wsp", where <template_name>.wsp is the .wsp file for your template.

    4.      Next, run "Stsadm -o deploysolution -name <template_name>.wsp -allowgacdeployment"

    Note:

    Additional attributes may be required based on your Windows SharePoint Services configuration like
    Single Server :  [-local | -time <time to deploy at>]
    Farm              :  [-immediate | -time <time to deploy at>]

    To see the list of attributes, run ‘Stsadm -help deploysolution’ or visit http://technet.microsoft.com/en-us/library/cc288449(office.12).aspx

     

    5.      To check the deployment status, browse to Central Administration > Operations tab > Solution management under Global Configuration. The solution(s) will be marked as Globally Deployed.

    6.      Run IISreset from the command line.

     

    Using the new templates to create a new site

     

    To create a new site, follow these steps

     

    • From the Site Actions drop-down menu in the top right, select Site Settings.
    • Under the Site Administration section, select 'Create Site' to create a new site using a site template.

     Site Actions

    • Complete the new SharePoint site information.
    • In the Template Selection section, we will now have the new templates available under the “Application Templates” and “Custom” tabs.
    • All deployed templates will be listed in this tab.
    • Select the template to use for this site and click Create.
    • A site will now be created using the chosen template.

     Template selection

    Removing a template

    This process will not remove any sites that were already created using the template. It will only prevent users from creating new sites based on the template. The Application Template Core solution must remain installed and deployed for other server admin templates to be installed.

    1.      Removing a solution is done via the ‘Stsadm’ command line utility.

    2.      To retract a solution from being available to SharePoint sites, run ‘Stsadm -o retractsolution -name <template_name>.wsp’ where <template_name>.wsp is the .wsp file for your template.

     

    To see a list of optional attributes available with this command, run ‘Stsadm -help retractsolution’ or visit http://technet.microsoft.com/en-us/library/cc287669(office.12).aspx

    3.      To remove a solution from the server, run ‘Stsadm -o deletesolution -name <template_name>.wsp’

    To see a list of optional attributes available with this command, run ‘Stsadm -help deletesolution’ or visit http://technet.microsoft.com/en-us/library/cc288697(office.12).aspx

    4.      The application template is now unavailable to SharePoint sites and the solution has been removed from the solution store.

     

    Note:

    You must be a Farm administrator to complete the installation and once you do these templates will be universally available. You will now have two new tabs called ‘Application Templates’ and ‘Custom’ under the ‘Template Selection’ section when you create a new site.

  • Create a new Search Service Application in SharePoint 2013 using PowerShell

     

    The search architecture in SharePoint 2013 has changed quite a bit when compared to SharePoint 2010. In fact the Search Service in SharePoint 2013 is completely overhauled. It is a combination of FAST Search and SharePoint Search components.

    apxvsdik


    As you can see the query and crawl topologies are merged into a single topology, simply called "Search topology". Provisioning of the search service application creates 4 databases:

    • SP2013_Enterprise_Search - This is a search administration database. It contains configuration and topology information
    • SP2013_Enterprise_Search_AnalyticsReportingStore - This database stores the result of usage analysis
    • SP2013_Enterprise_Search_CrawlStore - The crawl database contains detailed tracking and historical information about crawled items
    • SP2013_Enterprise_Search_LinksStore - Stores the information extracted by the content processing component and also stores click-through information

    # Create a new Search Service Application in SharePoint 2013

    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

    # Settings
    $IndexLocation = "C:\Data\Search15Index” #Location must be empty, will be deleted during the process!
    $SearchAppPoolName = "Search App Pool"
    $SearchAppPoolAccountName = "Contoso\administrator"
    $SearchServerName = (Get-ChildItem env:computername).value
    $SearchServiceName = "Search15"
    $SearchServiceProxyName = "Search15 Proxy"
    $DatabaseName = "Search15_ADminDB"
    Write-Host -ForegroundColor Yellow "Checking if Search Application Pool exists"
    $SPAppPool = Get-SPServiceApplicationPool -Identity $SearchAppPoolName -ErrorAction SilentlyContinue

    if (!$SPAppPool)
    {
        Write-Host -ForegroundColor Green "Creating Search Application Pool"
        $spAppPool = New-SPServiceApplicationPool -Name $SearchAppPoolName -Account $SearchAppPoolAccountName -Verbose
    }

    # Start Services search service instance
    Write-host "Start Search Service instances...."
    Start-SPEnterpriseSearchServiceInstance $SearchServerName -ErrorAction SilentlyContinue
    Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $SearchServerName -ErrorAction SilentlyContinue

    Write-Host -ForegroundColor Yellow "Checking if Search Service Application exists"
    $ServiceApplication = Get-SPEnterpriseSearchServiceApplication -Identity $SearchServiceName -ErrorAction SilentlyContinue

    if (!$ServiceApplication)
    {
        Write-Host -ForegroundColor Green "Creating Search Service Application"
        $ServiceApplication = New-SPEnterpriseSearchServiceApplication -Partitioned -Name $SearchServiceName -ApplicationPool $spAppPool.Name 
    -DatabaseName $DatabaseName
    }

    Write-Host -ForegroundColor Yellow "Checking if Search Service Application Proxy exists"
    $Proxy = Get-SPEnterpriseSearchServiceApplicationProxy -Identity $SearchServiceProxyName -ErrorAction SilentlyContinue

    if (!$Proxy)
    {
        Write-Host -ForegroundColor Green "Creating Search Service Application Proxy"
        New-SPEnterpriseSearchServiceApplicationProxy -Partitioned -Name $SearchServiceProxyName -SearchApplication $ServiceApplication
    }


    $ServiceApplication.ActiveTopology
    Write-Host $ServiceApplication.ActiveTopology

    # Clone the default Topology (which is empty) and create a new one and then activate it
    Write-Host "Configuring Search Component Topology...."
    $clone = $ServiceApplication.ActiveTopology.Clone()
    $SSI = Get-SPEnterpriseSearchServiceInstance -local
    New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $SSI
    New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone -SearchServiceInstance $SSI
    New-SPEnterpriseSearchAnalyticsProcessingComponent –SearchTopology $clone -SearchServiceInstance $SSI
    New-SPEnterpriseSearchCrawlComponent –SearchTopology $clone -SearchServiceInstance $SSI

    Remove-Item -Recurse -Force -LiteralPath $IndexLocation -ErrorAction SilentlyContinue
    mkdir -Path $IndexLocation -Force

    New-SPEnterpriseSearchIndexComponent –SearchTopology $clone -SearchServiceInstance $SSI -RootDirectory $IndexLocation
    New-SPEnterpriseSearchQueryProcessingComponent –SearchTopology $clone -SearchServiceInstance $SSI
    $clone.Activate()

    Write-host "Your search service application $SearchServiceName is now ready"

    Update

    To configure failover server(s) for Search DBs, use the following PowerShell:

    Thanks to Marcel Jeanneau for sharing this!

    #Admin Database
    $ssa = Get-SPEnterpriseSearchServiceApplication “Search Service Application”
    Set-SPEnterpriseSearchServiceApplication –Identity $ssa –FailoverDatabaseServer <failoverServerAlias\instance>

    #Crawl Database
    $CrawlDatabase0 = ([array]($ssa | Get-SPEnterpriseSearchCrawlDatabase))[0]
    Set-SPEnterpriseSearchCrawlDatabase -Identity $CrawlDatabase0 -SearchApplication $ssa -FailoverDatabaseServer <failoverServerAlias\instance>

    #Links Database
    $LinksDatabase0 = ([array]($ssa | Get-SPEnterpriseSearchLinksDatabase))[0]
    Set-SPEnterpriseSearchLinksDatabase -Identity $LinksDatabase0 -SearchApplication $ssa -FailoverDatabaseServer <failoverServerAlias\instance>

    #Analytics database
    $AnalyticsDB = Get-SPDatabase –Identity <id of database>
    $AnalyticsDB.AddFailOverInstance(“failover alias\instance”)
    $AnalyticsDB.Update()

     

    See the following articles for information about Search Service Application in SharePoint 2013