none
SharePoint 2013 (RTM) Powershell New-SPEnterpriseSearchApplicationService error about non-existent "indexlocation" parameter ??

    Question

  • I am trying to script the setup of my SharePoint 2013 farm.  I'm getting something wierd on the creation of the Search service app.  It complains that the "indexLocation" parameter cannot be null.  But there is no such parameter.  According to http://technet.microsoft.com/en-us/library/ff607751.aspx, the only required parametes are name and application pool.

    The SA seems to get created anyway (I haven't tested it yet), but huh???

    $SearchSA=New-SPEnterpriseSearchServiceApplication-Name$searchSAName-ApplicationPool$saAppPoolName-DatabaseName($dbNamePrefix+"Search"

    New-SPEnterpriseSearchServiceApplication : Value cannot be null.

    Parameter name: indexLocation

    At line:7 char:13

    + $SearchSA = New-SPEnterpriseSearchServiceApplication -Name $searchSAName -Applic ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidData: (Microsoft.Offic...viceApplication:NewSearchServiceApplication) [New-SPEnterpriseSearchServiceApplication], ArgumentNullEx

       ception

        + FullyQualifiedErrorId : Microsoft.Office.Server.Search.Cmdlet.NewSearchServiceApplication

     

    Thursday, November 22, 2012 6:00 PM

Answers

All replies

  • The SSA created by this command was, in fact, not valid.  For example, the

    I could not figure out what was wrong with the command, and gave up and used the Central Admin GUI.

     

    • Marked as answer by Carlo.G Monday, November 26, 2012 6:21 AM
    Monday, November 26, 2012 6:21 AM
  • Make sure you start Search Host Controller Service and Search Query and Site Settings Service before running New-SPEnterpriseSearchServiceApplication.

    You can start these SharePoint services from Central Administration (Central Administration -> Application Management -> Manage Services on server), or by calling these commands:

    Get-SPEnterpriseSearchServiceInstance -Local | Start-SPEnterpriseSearchServiceInstance;
    Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance -Local | Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance;
    I was in the same situation when I wrote my custom SharePoint wizard.
    Thursday, January 03, 2013 2:26 PM
  • Hi!

    You can create Search Service App by using PowerShell. I've had the same problem as you today. I could figure out how to solve this. You need to set "DefaultIndexLocation" of the server's Search Service Instance.

    I wrote a little note about this:

    http://blog.karstein-consulting.com/2013/01/04/short-note-about-error-while-creating-search-service-application-for-sharepoint-2013-by-powershell-value-cannot-be-null-parameter-name-indexlocation/

    Regards
    Ingo


    Microsoft Certified Master - SharePoint 2010

    • Proposed as answer by Jesper Arnecke Tuesday, January 22, 2013 3:30 PM
    • Marked as answer by Carlo.G Tuesday, January 22, 2013 4:07 PM
    Friday, January 04, 2013 1:59 PM
  • Make sure you start Search Host Controller Service and Search Query and Site Settings Service before running New-SPEnterpriseSearchServiceApplication.

    You can start these SharePoint services from Central Administration (Central Administration -> Application Management -> Manage Services on server), or by calling these commands:

    Get-SPEnterpriseSearchServiceInstance -Local | Start-SPEnterpriseSearchServiceInstance;
    Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance -Local | Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance;
    I was in the same situation when I wrote my custom SharePoint wizard.

    I encountered this issue and this was the resolution in my case as well. For me though, what I found interesting is I was running the scripts from a server that was not part of the search topology, which was why I hadn't started the service instances.

    Starting the service instances allows New-SPEnterpriseSearchServiceApplication to run.

    Edit: I encountered this issue again and wanted to further clarify: go ahead and start the search and query services on the server you're running the New-SPEnterpriseSearchServiceApplication cmdlet, even if it's not part of the search topology. Once the service is configured you can stop these services.

    In my case this happens because I'm automating the service creation from a server that is not part of the search topology -- I have dedicated search servers and am configuring the farm from another application server.



    • Edited by Jason WarrenMVP Thursday, September 25, 2014 7:32 PM clarify starting search
    Wednesday, March 12, 2014 11:13 PM