How to install a SharePoint 2010 Complete (Dev) Server without AD

This post details how you do install a SharePoint 2010 as a “complete” install without an AD, which is very useful to me as a development server (with or without Visual Studio).

This applies to both virtual and physical machines but I always work with VMs because traditionally SharePoint dev environments need to be re-installed once in a while and that’s easier with VMs.

Why would you want this?

  • A development server with all components is likely to resemble your test/QA/production environment a lot more than the alternative standalone install
  • A server with a local install of SharePoint with non-AD accounts can be run with or without an AD domain – you can even run the VM as a domain server disconnected from the actual domain e.g. at home or the commute
    • Alternative 1: Make your server an AD server but that changes all sorts of stuff with user management and will definitely not resemble any of your production servers
    • Alternative 2: Create two VMs one being the AD one being the actual development server connected on the same VLAN and waste a lot of resources for (almost) nothing.
  • To eliminate any need for rogue AD servers on your network that some develop accidently connected directly to the network and running DHCP, DNS etc. Don’t trust your developers or external consultants to care about your network!
  • I want a full SQL Server!

Why would you not want this?

  • This is not a supported development environment from Microsoft – they support installing a so-called standalone development environment without any of the frills. It’s easier and it’s officially supported. It’s even doable on Windows 7.
    • Why anyone would want to develop SharePoint on a Windows 7 machine is beyond me, the runtime environment for your code will always be a server 2008 so why not develop and test it directly on such a box? Surely you develop only in VMs so that you are able to create a clean dev environment easily once in a while…

How to

The procedure is fairly simple except for the final steps. Note that you can (and should) use whatever tools you can to help you out, I’ll point at the promising AutoSPInstaller at CodePlex.

Procedure:

  1. Create / install a Server 2008 (R2) 64 bit with
    1. Visual Studio 2010
    2. SQL Server 2008 (use a local user as service account)
    3. … and whatever other tools you are fond of …
    4. (Remember to sysprep/snapshot it at this stage)
  2. Install SharePoint 2010 with all prerequisites
    1. Scripted or not – do not run Config Wizard yet (It would result in “Local accounts should only be used in standalone mode” error)
  3. Create the farm by (trick #1)
    1. Start the SharePoint PowerShell
    2. Create a local service account
    3. Create a farm by running the “New-SPConfigurationDatabase” cmdlet and supply parameters for the service account, DB name, DB server and passphrase (thanks to Neil ‘The Doc’ Hodgkinson for that)
    4. After it finishes start the Config Wizard (interactive or not) and configure your server with all components
  4. Configure the farm services as you like
    1. I usually just use the wizard in Central Admin to configure all the Service Applications with some fairly useful values it works well enough
  5. Enterprise Search doesn’t work to fix it see below… (trick #2)

The Trouble with Search

Search will fail with a number of errors and in the search administration the Query Component will remain stuck in the initializing state:

The other bunch of event log errors etc. is listed at the end of this post for the benefit of Google.

As far as I can conjecture the problem is that the timer service is trying to setup a network share for every query component where the crawlers can dump their data. It is trying to setup that share with a domain account that happens to be a local user instead in this case and fails with either an “Access Denied” error or a “System.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated”.

The share name it’s trying to use is the same as the query role, i.e. “Guid-query-0″ pointing to (if using default locations) “C:\program files\Microsoft Office Servers\14.0\Data\Office Server\Applications” with change permissions for the “WSS_WPG” group.

Unfortunately it does not help to just create the share for it apparently the query components insist on waiting for the timer job to complete successfully. L

The Search Fix

The fix is fairly simple and almost completed by Gary Lapointe whom I owe great thanks for doing most of the hard work in his post on scripting the Enterprise Search installation and the comments below his post (thanks to Marco van Wieren).

The fix is simply to create and configure all the enterprise search components from PowerShell as it allows you to set a few more options, specifically the share name for the query components so that you are then allowed to create them yourself.

The script was originally made for configuring search components across an entire farm and therefore a bit more complicated than it strictly has to be. I left it in there while adding support for single server install as well. Gary’s script was made for beta 2 and I’ve fixed a few simple errors/typos, corrected the few API changes between beta 2 and RTM and finally added the share name support.

The script is quite long a not suitable for pasting into a blog – download instead.

The script needs a configuration file with something like this:

<Services>
    <EnterpriseSearchService ContactEmail="no-reply@SharePointDev1.com"
                             ConnectionTimeout="60"
                             AcknowledgementTimeout="60"
                             ProxyType="Default"
                             IgnoreSSLWarnings="false"
                             InternetIdentity="Mozilla/4.0 (compatible; MSIE 4.01; Windows NT; MS Search 6.0 Robot)"
                             IndexLocation="C:\Program Files\Microsoft Office Servers\14.0\Data\Office Server\Applications"
                             PerformanceLevel="PartlyReduced"
                             Account="localhost\saservice"
                             ShareName="SearchShare">

        <EnterpriseSearchServiceApplications>
            <EnterpriseSearchServiceApplication Name="Enterprise Search Service Application"
                                                DatabaseServer="localhost"
                                                DatabaseName="SharePoint_Search"
                                                FailoverDatabaseServer=""
                                                Partitioned="false"
                                                Partitions="1"
                                                SearchServiceApplicationType="Regular">
                <ApplicationPool Name="SharePoint Enterprise Search Application Pool" Account="localhost\saservice" />
                <CrawlServers>
                    <Server Name="localhost" />
                </CrawlServers>
                <QueryServers>
                    <Server Name="localhost" />
                </QueryServers>
                <SearchQueryAndSiteSettingsServers>
                    <Server Name="localhost" />
                </SearchQueryAndSiteSettingsServers>
                <AdminComponent>
                    <Server Name="localhost" />
                    <ApplicationPool Name="SharePoint Enterprise Search Application Pool" Account="localhost\saservice" />
                </AdminComponent>
                <Proxy Name="Enterprise Search Service Application Proxy" Partitioned="false">
                    <ProxyGroup Name="Default" />
                </Proxy>
            </EnterpriseSearchServiceApplication>
        </EnterpriseSearchServiceApplications>
    </EnterpriseSearchService>
</Services>

Remarks:

  • I replace “localhost” with the actual computer name in the script
  • The Share Name (here “SearchShare”) will be created by the script as well, so whatever you call it doesn’t matter
  • The config file shown can be reused on every machine provided that the local service account “saservice” has been created before

To continue and complete step 5 in the procedure above (sorry for the numbering wordpress is messing up the html):

  1. Start PowerShell shell (I will load the SharePoint snapin if it’s not a SharePoint Management Shell)
    1. Load the “SetupEnterpriseSearch.ps1” script (just drag the file into the shell and execute) which will define the required functions
    2. Execute “Start-EnterpriseSearch “<path>\searchconfig.xml””
    3. Wait for a few minutes and watch for errors
  2. Go to the Search Administration and verify that your new search topology works
    1. It should look something like this:

    2. If you configured search in step 4 you will have two
    3. If you have two you can safely go back to “Manage service applications” and delete the one named “Search Service Application 1” (and associated databases) – the one created by the script is “Enterprise Search Service Application”
  3. Try it! Go to a local SharePoint site and search for something
    1. Before the search would return a server error 500 so anything else than that can be considered a success
    2. I like to add a few documents and have them show up in the search before I call it a success…

Caveats / Fast Search

Don’t know if it fair to call it a caveat however only the Enterprise Search is demonstrated here, the Fast Search behaves similarly in respect to the “share trouble” and will probably need the same fix as the enterprise search. I’ve not found the time or need to poke around with that just yet, but it should be doable in less than a day given the foundation above (for someone skilled in SharePoint and powershell).

Conclusions

It works; I’ll use it from now on 🙂

… and I hope the nice chaps at AutoSPInstall will include this fix in their tool.

Scared of being in unsupported land?

  • It’s only your dev server and it did move a lot closer to production that the standalone dev machine option
  • It also protected your network from rogue AD servers that might potentially kill half your network if you are unlucky

So how well is this tested? Quite well for a single server install and not at all for a farm install (not by me at least). Trust it with the former and test it yourself if you need the latter.

Observed Errors

I got a lot of different errors, here they are for the benefit of Google.

Event log entry after completing the configuration wizard in Central Administration:

Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Server Search
Date: 11-06-2010 22:20:17
Event ID: 2579
Task Category: Administration
Level: Error
Keywords:
User: SHAREPOINTDEV1\saservice
Computer: SharePointDev1
Description:
Component a61ca0ca-194f-4cf0-bb5c-8ca998178935-query-0 of search application ‘Search Service Application’ has failed to execute transition sequence ‘initialize with empty catalog’ due to the following error: System.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated.
Parameter name: sddlForm
at System.Security.AccessControl.RawSecurityDescriptor.BinaryFormFromSddlForm(String sddlForm)
at System.Security.AccessControl.RawSecurityDescriptor..ctor(String sddlForm)
at Microsoft.SharePoint.Win32.SPNetApi32.CreateShareSecurityDescriptor(String[] readNames, String[] changeNames, String[] fullControlNames, String& sddl)
at Microsoft.SharePoint.Win32.SPNetApi32.CreateFileShare(String name, String description, String path)
at Microsoft.SharePoint.Administration.SPServer.CreateFileShare(String name, String description, String path)
at Microsoft.Office.Server.Search.Administration.QueryComponent.CreatePropagationShare(QueryComponent component)
at Microsoft.Office.Server.Search.Administration.QueryComponent.ExecuteCurrentStage(). It is now in state Uninitialized.
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event“>
<System>
<Provider Name=”Microsoft-SharePoint Products-SharePoint Server Search” Guid=”{C8263AFE-83A5-448C-878C-1E5F5D1C4252}” />
<EventID>2579</EventID>
<Version>14</Version>
<Level>2</Level>
<Task>14</Task>
<Opcode>0</Opcode>
<Keywords>0×4000000000000000</Keywords>
<TimeCreated SystemTime=”2010-06-11T20:20:17.723875000Z” />
<EventRecordID>3926</EventRecordID>
<Correlation ActivityID=”{B1431F7E-1D0C-4CB7-B690-F0F016447FE4}” />
<Execution ProcessID=”956? ThreadID=”3484? />
<Channel>Application</Channel>
<Computer>SharePointDev1</Computer>
<Security UserID=”S-1-5-21-452889701-636363473-2591022535-1012? />
</System>
<EventData>
<Data Name=”string0?>a61ca0ca-194f-4cf0-bb5c-8ca998178935-query-0</Data>
<Data Name=”string1?>Search Service Application</Data>
<Data Name=”string2?>initialize with empty catalog</Data>
<Data Name=”string3?>System.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated.
Parameter name: sddlForm
at System.Security.AccessControl.RawSecurityDescriptor.BinaryFormFromSddlForm(String sddlForm)
at System.Security.AccessControl.RawSecurityDescriptor..ctor(String sddlForm)
at Microsoft.SharePoint.Win32.SPNetApi32.CreateShareSecurityDescriptor(String[] readNames, String[] changeNames, String[] fullControlNames, String&amp; sddl)
at Microsoft.SharePoint.Win32.SPNetApi32.CreateFileShare(String name, String description, String path)
at Microsoft.SharePoint.Administration.SPServer.CreateFileShare(String name, String description, String path)
at Microsoft.Office.Server.Search.Administration.QueryComponent.CreatePropagationShare(QueryComponent component)
at Microsoft.Office.Server.Search.Administration.QueryComponent.ExecuteCurrentStage()</Data>
<Data Name=”string4?>Uninitialized</Data>
</span
</EventData>
</Event>

And from the ULS log:

06/11/2010 22:20:17.72         OWSTIMER.EXE (0x03BC)         0x0D9C        SharePoint Server Search         Administration         fea9        Critical        Component a61ca0ca-194f-4cf0-bb5c-8ca998178935-query-0 of search application ‘Search Service Application’ has failed to execute transition sequence ‘initialize with empty catalog’ due to the following error: System.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated. Parameter name: sddlForm at System.Security.AccessControl.RawSecurityDescriptor.BinaryFormFromSddlForm(String sddlForm) at System.Security.AccessControl.RawSecurityDescriptor..ctor(String sddlForm) at Microsoft.SharePoint.Win32.SPNetApi32.CreateShareSecurityDescriptor(String[] readNames, String[] changeNames, String[] fullControlNames, String& sddl) at Microsoft.SharePoint.Win32.SPNetApi32.CreateFileShare(String name, String description, String path) at Microsoft.S…        b1431f7e-1d0c-4cb7-b690-f0f016447fe4
06/11/2010 22:20:17.72*        OWSTIMER.EXE (0x03BC)         0x0D9C        SharePoint Server Search         Administration         fea9        Critical        …harePoint.Administration.SPServer.CreateFileShare(String name, String description, String path) at Microsoft.Office.Server.Search.Administration.QueryComponent.CreatePropagationShare(QueryComponent component) at Microsoft.Office.Server.Search.Administration.QueryComponent.ExecuteCurrentStage(). It is now in state Uninitialized.        b1431f7e-1d0c-4cb7-b690-f0f016447fe4
06/11/2010 22:20:17.72         OWSTIMER.EXE (0x03BC)         0x0D9C        SharePoint Server         Unified Logging Service         2m1i        Verbose         Adding event 2579 (category: Administration, product: SharePoint Server Search) to spam monitoring list        b1431f7e-1d0c-4cb7-b690-f0f016447fe4
06/11/2010 22:20:17.72         OWSTIMER.EXE (0x03BC)         0x0D9C        SharePoint Server Search         Administration         djs2        Medium         SearchApi (): executing SetQueryComponent(d355048f-d4fa-4f31-88b0-342b5ed48e5c, null, null, null, null, Uninitialized, Uninitialized, null, -1, Failed, null, False, null, null, False, null)        b1431f7e-1d0c-4cb7-b690-f0f016447fe4

And another event log:

Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Foundation
Date: 12-06-2010 20:40:26
Event ID: 6398
Task Category: Timer
Level: Critical
Keywords:
User: SHAREPOINTDEV1\saservice
Computer: SharePointDev1
Description:
The Execute method of job definition Microsoft.Office.Server.Search.Administration.CrawlReportJobDefinition (ID 9529aace-a679-4fc9-ab8d-325780484cf0) threw an exception. More information is included below.
The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component ’3147b99c-8f3a-41e9-a08b-296f930af877' in search application ‘Enterprise Search Service Application’ is in a good state and try again.
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event“>
<System>
<Provider Name=”Microsoft-SharePoint Products-SharePoint Foundation” Guid=”{6FB7E0CD-52E7-47DD-997A-241563931FC2}” />
<EventID>6398</EventID>
<Version>14</Version>
<Level>1</Level>
<Task>12</Task>
<Opcode>0</Opcode>
<Keywords>0×4000000000000000</Keywords>
<TimeCreated SystemTime=”2010-06-12T18:40:26.553054700Z” />
<EventRecordID>4159</EventRecordID>
<Correlation ActivityID=”{6CED0041-2038-43E3-AB79-4DEFBB4216B3}” />
<Execution ProcessID=”1324? ThreadID=”1532? />
<Channel>Application</Channel>
<Computer>SharePointDev1</Computer>
<Security UserID=”S-1-5-21-452889701-636363473-2591022535-1012? />
</System>
<EventData>
<Data Name=”string0?>Microsoft.Office.Server.Search.Administration.CrawlReportJobDefinition</Data>
<Data Name=”string1?>9529aace-a679-4fc9-ab8d-325780484cf0</Data>
<Data Name=”string2?>The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component ’3147b99c-8f3a-41e9-a08b-296f930af877' in search application ‘Enterprise Search Service Application’ is in a good state and try again.</Data>
</EventData>
</Event>

And one for foundation search:

Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Date:          …
Event ID:      6398
Task Category: Timer
Level:         Critical
Keywords:
User:          …
Computer:      …
Description:
The Execute method of job definition Microsoft.Office.Server.Search.Administration.QueryTopologyActivationJobDefinition (ID de8eac2b-57db-4069-896d-747ae4fb35ed) threw an exception. More information is included below.
Topology activation was aborted because of System.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated.
Parameter name: sddlForm
at System.Security.AccessControl.RawSecurityDescriptor.BinaryFormFromSddlForm(String sddlForm)
at System.Security.AccessControl.RawSecurityDescriptor..ctor(String sddlForm)
at Microsoft.SharePoint.Win32.SPNetApi32.CreateShareSecurityDescriptor(String[] readNames, String[] changeNames, String[] fullControlNames, String& sddl)
at Microsoft.SharePoint.Win32.SPNetApi32.CreateFileShare(String name, String description, String path)
at Microsoft.SharePoint.Administration.SPServer.CreateFileShare(String name, String description, String path)
at Microsoft.Office.Server.Search.Administration.QueryComponent.CreatePropagationShare(QueryComponent component)
at Microsoft.Office.Server.Search.Administration.QueryComponent.ExecuteCurrentStage().
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event“>
<System>
<Provider Name=”Microsoft-SharePoint Products-SharePoint Foundation” Guid=”{6fb7e0ce-52e7-47dd-997a-241563931fc2}” />
<EventID>6398</EventID>
<Version>14</Version>
<Level>1</Level>
<Task>12</Task>
<Opcode>0</Opcode>
<Keywords>0×4000000000000000</Keywords>
<EventRecordID>10895</EventRecordID>
<Correlation ActivityID=”{6E239D20-A2CD-45B4-AC87-4477A82558BB}” />
<Execution ProcessID=”2016? ThreadID=”2288? />
<Channel>Application</Channel>
<Computer>id1314</Computer>
<Security UserID=”S-1-5-21-30024279817-590149927-1659320300-1003? />
</System>
<EventData>
<Data Name=”string0?>Microsoft.Office.Server.Search.Administration.QueryTopologyActivationJobDefinition</Data>
<Data Name=”string1?>de8eac2b-57db-4069-896d-747ae4fb35ed</Data>
<Data Name=”string2?>Topology activation was aborted because of System.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated.
Parameter name: sddlForm
at System.Security.AccessControl.RawSecurityDescriptor.BinaryFormFromSddlForm(String sddlForm)
at System.Security.AccessControl.RawSecurityDescriptor..ctor(String sddlForm)
at Microsoft.SharePoint.Win32.SPNetApi32.CreateShareSecurityDescriptor(String[] readNames, String[] changeNames, String[] fullControlNames, String&amp; sddl)
at Microsoft.SharePoint.Win32.SPNetApi32.CreateFileShare(String name, String description, String path)
at Microsoft.SharePoint.Administration.SPServer.CreateFileShare(String name, String description, String path)
at Microsoft.Office.Server.Search.Administration.QueryComponent.CreatePropagationShare(QueryComponent component)
at Microsoft.Office.Server.Search.Administration.QueryComponent.ExecuteCurrentStage().</Data>
</EventData>
</Event>

And finally from Gary’s blog (Marco van Wieren):

Component: 3b609311-67da-4df8-8c12-e597e9228dd3-crawl-0
Details:
The system cannot find the file specified. 0x80070002Propagation for search application 3b609311-67da-4df8-8c12-e597e9228dd3-crawl-0: failed to communicate with query server 3b609311-67da-4df8-8c12-e597e9228dd3-query-0.

About Søren Nielsen
Long time SharePoint Consultant.

61 Responses to How to install a SharePoint 2010 Complete (Dev) Server without AD

  1. eric van glabbeek says:

    I have the same problem, so i was very glad to see your solution. However …. i can’t seem to get it to work.
    I load the setupenterpriseSearch.ps1. When i then try to execute the Start-enterpriseSearch option with a valid xml file i get the following error: The term ‘Start-EnterpriseSearch’ is not recognized as the name of a cmdlet, function, script file, or operable program.
    I’m still trying to find out why.

    • The “Start-enterpriseSearch” function is defined within the script. So first you need to run the script that defines the functions and then you need to call it.

      Have you set the execution policy? “set-executionpolicy remotesigned”

      If you continue to have trouble with this, just open the .ps1 file in notepad and copy all directly into the PowerShell window. That’s almost a foolproof way to execute stuff like this without thinking about the execution policy crap.

      Let me know if it helps.

  2. ThinkBox says:

    Hi Søren Nielsen,
    I asked this question on MS Technet, but got no answer. Finally, I find your excellent post. Although some errors and warnings ocurred while executing “Start-EnterpriseSearch ” command, the search service application works correctly now.
    Thank you very much!

  3. Sergey says:

    The search fix helped me a lot!!! Thank you!

  4. JoyceMR says:

    So thankful for this post! Passingon the following note for others who may need the info:
    I found that the current script download has the configuration xml file name hard coded in the Start-EnterpriseSearch function. Changed it to the full path and filename of my config file, added the invocation of the function at the end of the script without passing the file as a parameter, and everything worked great!
    Thanks again!

  5. Pingback: Cliff Green's Blog

  6. Pingback: Blog Post: Common SharePoint 2010 Developer Installation Issues | IT.beta

  7. Kieran says:

    Hi there, thanks for your work on this script. After running the script successfully on a local dev machine, the service is now running and indexing content correctly. I seem to have a problem whereby when I perform a search though I get ‘The search request was unable to connect to the Search Service.’ Looking in the logs it’s getting an error CoreResultsWebPart::OnInit: Exception initializing: Microsoft.Office.Server.Search.Query.SearchServiceNotFoundException

    Do I need to update the relationship between the web application and the new search service?

    Would appreciate your thoughts.

    • Hi Kieran

      Yes you do.

      The script creates a brand new search instance in addition to whatever might be there beforehand. Therefore you need to go into the CA and the Services Applications and connect the new one to your web app.

      Should work 😉

  8. prabha says:

    Hi,I have exactly the same problem since the query component is stuck on ‘initialzing’. I tried to create new search service application using your Search Fix.I was able to run the script and exceute it but the step’ Waiting on Query components to provision ..’ is going on
    and the new search service application created has no Index partition and query component.How can I fix that .Thanks in advance.

    • Hi Prabha

      Not sure. You can try to delete your existing search application before you run the script – or just delete all search applications and then run the script.

      Perhaps you had a pending search topologi change that was stuck? Just a guess as I have no way to verify.

      Let me know how it goes.

      • prabha says:

        Hi Soren,
        Thank you so much.It worked and now search is working fine.I forgot to change the computer name in the script and that is why it was stuck on ‘waiting for the query components to provision’.Now everything works perfect for search and thank you so much for your great code.

  9. Pingback: Error con el servicio de búsqueda de SharePoint Server Enterprise 2010 en una instalación de servidor único. - Fabián Imaz

  10. Tarun Khurana says:

    Hi,

    I was going crazy with ‘Query component’ status showing up as ‘Initializing’ to till I found your post. In my case when running your script it displayed periodic messages in red color ‘Waiting on crawl component to provision…’ around 15 times and eventually moved on ‘Setting query topology as active’

    When I look the search in Central administration it is displaying ‘Crawl Component’s status to recovering while everything else is Online. After couple of minutes it came back as ‘Online’ as well.

    I noticed the following errors in event log when the script was running:

    1st : Error : Volume Shadow Copy Service error: Unexpected error calling routine RegOpenKeyExW
    2nd : Error :Unknown SQL Exception 2812 occurred. Could not find stored procedure ‘dbo.Search_GetRecentStats’.
    3rd : Critical : The Execute method of job definition Microsoft.Office.Server.Search.Monitoring.HealthStatUpdateJobDefinition (ID 5db7ddcc-e599-4614-aa57-5d729180b30e) threw an exception. Could not find stored procedure ‘dbo.Search_GetRecentStats’.

    Anyways my Search is working. Thanks so much on a brilliant post.

  11. Jan Inge says:

    Thx for posting this nice solution.
    I’ve just used it with success 🙂

  12. Andrew Eberhard says:

    Fantastic! This was very helpful. Many thanks!!

  13. Niall says:

    Hi Søren,

    Thanks so much for providing this work through on getting the search running. I know SharePoint has the ability to run in many different configurations, but I wish there was more support for people running outside of the supported configs.

    Thanks to you we have an excellent solution here, very well laid out and documented.

    Thanks again, Niall

  14. Tarun Khurana says:

    When I copy paste the contents of file “SetupEnterpriseSearch.ps1” and try to run the following command

    Start-EnterpriseSearch “SearchConfig.xml”

    I am getting the following error:

    The term ‘Get-SPServiceApplicationPool’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
    the name, or if a path was included, verify that the path is correct and try again.

    Any ideas what I might be doing wrong.

    • I will guess that the sharepoint cmdlets have not been loaded.

      The easiest way is to make sure that you start ps from the link within the sharepoint folder in the start menu.

  15. JohnDoe says:

    Hi Søren,

    I am going crazy here as well.

    I got to a certain point, but I am getting these errors:

    Setting default index location on search service…
    Creating enterprise search service application…
    Setting administration component…
    Creating new crawl topology…
    Creating new crawl component…
    You cannot call a method on a null-valued expression.
    At line:71 char:204
    + $crawlComponent = New-SPEnterpriseSearchCrawlComponent -Searc
    hServiceInstance $searchSvc -SearchApplication $searchApp -CrawlTopology $crawl
    Topology -CrawlDatabase $crawlStore.Id.ToString <<<< () -IndexLocation $appConf
    ig.IndexLocation
    + CategoryInfo : InvalidOperation: (ToString:String) [], RuntimeE
    xception
    + FullyQualifiedErrorId : InvokeMethodOnNull

    Creating new query topology…
    Creating new query component…
    Setting index partition and property store database…
    You cannot call a method on a null-valued expression.
    At line:92 char:111
    + $partition | Set-SPEnterpriseSearchIndexPartition -PropertyDa
    tabase $propertyStore.Id.ToString <<<< ()
    + CategoryInfo : InvalidOperation: (ToString:String) [], RuntimeE
    xception
    + FullyQualifiedErrorId : InvokeMethodOnNull

    Start-SPServiceInstance : Cannot validate argument on parameter 'Identity'. The
    argument is null. Supply a non-null argument and try the command again.
    At line:99 char:36
    + Start-SPServiceInstance <<<< (Get-SPServiceInstance | where { $_
    .TypeName -eq "Search Query and Site Settings Service"}).Id
    + CategoryInfo : InvalidData: (:) [Start-SPServiceInstance], Para
    meterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Share
    Point.PowerShell.SPCmdletStartServiceInstance

    Creating enterprise search service application proxy…
    Adding "Enterprise Search Service Application Proxy" to ""

    I have a feeling I have misconfigured the config file, but I do not know where exactly.

    I have a farm with one business server and one front end server.

    Any help is highly appreciated!

    Thank you!

    • Tarun Khurana says:

      Hi Johndoe,

      I was getting the error when I was following the following steps:
      1. Install SharePoint 2010
      2. Reboot Machine
      3. Manually create SharePoint_Config database using New-SPConfigurationDatabase cmdlet
      4. Reboot Machine
      5. Run Configuration Wizard
      6. Run Search setup script from this post.
      7. Got similar error as yours.

      I changed install sequence to following and was able to finish successfully.

      1. Un-install SharePoint 2010 completely.
      2. Delete any databases from previous run.
      3. Reboot Machine
      4. Install SharePoint 2010
      5. Manually create SharePoint_Config database using New-SPConfigurationDatabase cmdlet
      4. Run Configuration Wizard
      5. After Central Admin website opens choose ‘NOT’ to let it configure farm for you.
      6. Run Search setup script from this post.
      7. Cross your fingers!

      The only thing I can think of was that for some reason system was unregistering Sharepoint cmdlets’ from Powershell.

      Please let us know how it goes for you.

      Thanks

  16. JohnDoe says:

    Thank you Tarun for your answer,

    I do not know exactly what happened, but it started working.

    Installing the farm from scratch was not an option for us.

    However, I was able to create a new service application and it started working.

    Thank you guys for the great post!

  17. Pingback: Sharepoint: Make Enterprise Search work without AD | TECHNOLOGY CONSULTING

  18. Karen says:

    I am getting ready to run this script, but have a question before I begin. Above you state “The config file shown can be reused on every machine provided that the local service account “saservice” has been created before”. When I create the local account for this service what permission does it need?

    Thank you very much,
    Karen

  19. Pingback: Installing SharePoint 2010 via Powershell « Weird scenes inside the goldmine…

  20. Sri says:

    Soren,

    I am getting the “Initializing” error and I have read and read your article and many others all over the Internet and still stuck. My entire environment is in a Hyper-V VM. Windows Server 2008 R2 SP1 running SQL Server 2008 R2 and Sharepoint Server Standard – all in the same VM. I have to install this at a client site tomorrow and I have no idea what I should do. Any thoughts?

    • You don’t really provide enough info for troubleshooting, however i would check: – version. Is this the rtm version? – output from the script. It must give you some indication of success or not. – check that the sharename in the configuration file has been created, perhaps try to create it. – check the eventlog and uls log for clues.

      If all else fail use the local administrator as service account. Shouldn’t be necessary though.

  21. sushank says:

    Thank you so much. I was facing the same Query Component Initializing from 2 days after the database attach upgrade and after applying your powershell script it worked like anything.

    Thanks again.
    Sushank

  22. Pingback: VMWare or Hyper-V for Virtualization? « Thoughts on computing, SharePoint and all the rest

  23. shobs says:

    I get the error:

    Unexpected token ‘c:\sp2010\powershellscripts\searchconfig.xml””‘ in expression
    or statement.
    At line:1 char:72
    + “Start-EnterpriseSearch “c:\sp2010\powershellscripts\searchconfig.xml”” <<<<
    + CategoryInfo : ParserError: (c:\sp2010\power…rchconfig.xml"":
    String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

    • Søren Nielsen says:

      Remove the double quotes. Only the argument should be in quotes not the function.

      Med venlig hilsen / Kind regards Søren L. Nielsen

  24. shobs says:

    I get this error:

    Item not crawled due to one of the following reasons: Preventive crawl rule; Specified content source hops/depth exceeded; URL has query string parameter; Required protocol handler not found; Preventive robots directive. ( The item was deleted because it was either not found or the crawler was denied access to it. )

  25. shobs says:

    I also get this error in event viewer.

    WebHost failed to process a request.
    Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/11429296
    Exception: System.ServiceModel.ServiceActivationException: The service ‘/ab16c13cd93f4afba989191d76c9b8a8/ExcelService.asmx’ cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly ‘Microsoft.Office.Excel.Server.CalculationServer.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. The system cannot find the file specified.. —> System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.Office.Excel.Server.CalculationServer.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. The system cannot find the file specified.
    File name: ‘Microsoft.Office.Excel.Server.CalculationServer.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’
    at System.Signature._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle)
    at System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandle fieldHandle, RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
    at System.Signature..ctor(RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
    at System.Reflection.RuntimeMethodInfo.get_Signature()
    at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters()
    at System.Reflection.RuntimeMethodInfo.GetParameters()
    at System.ServiceModel.Description.ServiceReflector.HasEndMethodShape(MethodInfo method)
    at System.ServiceModel.Description.ServiceReflector.GetEndMethod(MethodInfo beginMethod)
    at System.ServiceModel.Description.TypeLoader.CreateOperationDescription(ContractDescription contractDescription, MethodInfo methodInfo, MessageDirection direction, ContractReflectionInfo reflectionInfo, ContractDescription declaringContract)
    at System.ServiceModel.Description.TypeLoader.CreateOperationDescriptions(ContractDescription contractDescription, ContractReflectionInfo reflectionInfo, Type contractToGetMethodsFrom, ContractDescription declaringContract, MessageDirection direction)
    at System.ServiceModel.Description.TypeLoader.CreateContractDescription(ServiceContractAttribute contractAttr, Type contractType, Type serviceType, ContractReflectionInfo& reflectionInfo, Object serviceImplementation)
    at System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation)
    at System.ServiceModel.Description.ContractDescription.GetContract(Type contractType, Type serviceType)
    at System.ServiceModel.ServiceHost.CreateDescription(IDictionary`2& implementedContracts)
    at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
    at System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses)
    at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
    at Microsoft.Office.Excel.Server.CalculationServer.ExcelServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses)
    at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)

    — End of inner exception stack trace —
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
    at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
    Process Name: w3wp
    Process ID: 8664

  26. shobs says:

    I also get this error for search:

    A WebHost HTTP exception occurred.
    Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/33711845
    HtmlErrorMessage:

    Parser Error

    body {font-family:”Verdana”;font-weight:normal;font-size: .7em;color:black;}
    p {font-family:”Verdana”;font-weight:normal;color:black;margin-top: -5px}
    b {font-family:”Verdana”;font-weight:bold;color:black;margin-top: -5px}
    H1 { font-family:”Verdana”;font-weight:normal;font-size:18pt;color:red }
    H2 { font-family:”Verdana”;font-weight:normal;font-size:14pt;color:maroon }
    pre {font-family:”Lucida Console”;font-size: .9em}
    .marker {font-weight: bold; color: black;text-decoration: none;}
    .version {color: gray;}
    .error {margin-bottom: 10px;}
    .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

    Server Error in ‘/0dd0ee58c9ef4b1bbc52d6d7cee6af8c’ Application.

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Could not load type ‘Microsoft.Office.Server.Search.Administration.SearchServiceHostFactory’ from assembly ‘Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’.

    Source Error:

    
    Line 1:  <%@ServiceHost language=c# Debug="true" Factory="Microsoft.Office.Server.Search.Administration.SearchServiceHostFactory, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Service="Microsoft.Office.Server.Search.Administration.SearchServiceApplication, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    Line 2:  
    

    Source File: /0dd0ee58c9ef4b1bbc52d6d7cee6af8c/SearchService.svc    Line: 1

    Exception: System.ServiceModel.ServiceActivationException: The service ‘/0dd0ee58c9ef4b1bbc52d6d7cee6af8c/SearchService.svc’ cannot be activated due to an exception during compilation. The exception message is: The CLR Type ‘Microsoft.Office.Server.Search.Administration.SearchServiceHostFactory, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ could not be loaded during service compilation. Verify that this type is either defined in a source file located in the application’s \App_Code directory, contained in a compiled assembly located in the application’s \bin directory, or present in an assembly installed in the Global Assembly Cache. Note that the type name is case-sensitive and that the directories such as \App_Code and \bin must be located in the application’s root directory and cannot be nested in subdirectories.. —> System.Web.HttpCompileException: The CLR Type ‘Microsoft.Office.Server.Search.Administration.SearchServiceHostFactory, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ could not be loaded during service compilation. Verify that this type is either defined in a source file located in the application’s \App_Code directory, contained in a compiled assembly located in the application’s \bin directory, or present in an assembly installed in the Global Assembly Cache. Note that the type name is case-sensitive and that the directories such as \App_Code and \bin must be located in the application’s root directory and cannot be nested in subdirectories. —> System.Web.HttpParseException: The CLR Type ‘Microsoft.Office.Server.Search.Administration.SearchServiceHostFactory, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ could not be loaded during service compilation. Verify that this type is either defined in a source file located in the application’s \App_Code directory, contained in a compiled assembly located in the application’s \bin directory, or present in an assembly installed in the Global Assembly Cache. Note that the type name is case-sensitive and that the directories such as \App_Code and \bin must be located in the application’s root directory and cannot be nested in subdirectories. —> System.TypeLoadException: Could not load type ‘Microsoft.Office.Server.Search.Administration.SearchServiceHostFactory’ from assembly ‘Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’.
    at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
    at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
    at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
    at System.Type.GetType(String typeName, Boolean throwOnError)
    at System.ServiceModel.Activation.ServiceParser.GetType(String typeName)
    — End of inner exception stack trace —
    — End of inner exception stack trace —
    at System.ServiceModel.Activation.ServiceParser.GetType(String typeName)
    at System.ServiceModel.Activation.ServiceParser.GetCompiledType(Assembly compiledAssembly)
    at System.ServiceModel.Activation.ServiceParser.CreateParseString(Assembly compiledAssembly)
    at System.ServiceModel.Activation.ServiceBuildProvider.GetCustomStringCore(CompilerResults results)
    at System.ServiceModel.Activation.ServiceBuildProvider.GetCustomString(CompilerResults results)
    at System.Web.Compilation.BuildProvider.CreateBuildResult(CompilerResults results)
    at System.Web.Compilation.BuildProvider.GetBuildResult(CompilerResults results)
    at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
    at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
    at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
    at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
    at System.Web.Compilation.BuildManager.GetCompiledCustomString(String virtualPath)
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.GetCompiledCustomString(String normalizedVirtualPath)
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
    — End of inner exception stack trace —
    at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
    at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
    Process Name: w3wp
    Process ID: 12968

  27. I spent 2 days on this and it didn’t work. The index partition still shows “Initializing” and the search doesn’t work.

    – Is “saservice” an account that has to be created or can any account on the server be used? If that account is left in the XML config, there is a prompt for a password.

    Here is the PS session:

    ===================

    PS C:\Users\Administrator> Start-EnterpriseSearch “C:\SearchFix\searchconfig.xml”
    Creating network share “SearchShare=C:\Program Files\Microsoft Office Servers\14.0\Data\Office Server\Applications”
    SearchShare was shared successfully.

    Setting default index location on search service…
    Getting SHAREPOINTLOCAL\sp_admin account for application pool…
    Creating application pool SharePoint Enterprise Search Application Pool…
    WARNING: The specified user SHAREPOINTLOCAL\sp_admin is a local account. Local accounts should only be used in stand
    alone mode.
    Creating enterprise search service application…
    Setting administration component…
    Creating new crawl topology…
    Creating new crawl component…
    Creating new query topology…
    Creating new query component…
    Setting index partition and property store database…
    WARNING: ‘Search Query and Site Settings Service’ is already started on server ‘SHAREPOINTLOCAL’
    Setting new crawl topology to active…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Waiting on Crawl Components to provision…
    Setting query topology as active…
    Waiting on Query Components to provision…
    Creating enterprise search service application proxy…
    Adding “Enterprise Search Service Application Proxy” to “”

    FriendlyName Proxies DefaultProxies
    ———— ——- ————–
    [default] {Secure Store Service, State Service, Ma… {Secure Store Service, State Service, M…

    • Søren Nielsen says:

      Yes it is a local account i use to run most of the services. If you’ve spent two days already then just plugin one of your existing service account – perhaps the local admin if you are getting desperate.

      You likely want to delete the half way created shared search service.

  28. It’ Alive !!!
    Great Post.. thanks..

  29. Pingback: Dan Gibbons .Net Developer

  30. Earl Libby says:

    Thanks your script resolved most of my search issues, I am using FBA on my default site but extended the Web application to another zone that has NTLM authentication. Then in default content Source (Local Sharepoint sites) I put the NTLM Zone URL in the list… started a full crawl and the crawl log showed 499 successes and a few errors — errors not an issue — they were just some application pages.

    However when I login thru either URL (the FBA one or the NTLM one) and search I get no results no matter what I put in the search terms

    • Earl Libby says:

      Actually I do get search results but for the libraries instead of documents all I get is library view and dispform URLs in the search results — the same exact website on a local server using NTLM and FBA on the zone and AD works as it should returning document URLS in the search results.

  31. jose says:

    I’ve installed MOSS2010 (14.0.6114.5000) without AD in a test environment on port 80. I’ve extended the web app to port 8080 in order to use FBA (LDAP based). It’s working ok but searches do not work.
    I’m trying this fix but the “Start-EnterpriseSearch” command is not recognized by Powershell v2.0. The 2 commands that I found are: “Start-SPEnterpriseSearchServiceInstance” and “Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance”. Should I use one of them?

    Thanks.

    • jose says:

      I’ve run these 2 commands to see if it helps:

      PS C:\> Get-SPSearchService

      TypeName : SharePoint Foundation Search
      Id : f3aa351f-e07f-4cc8-8e11-a7e237991f17
      ServiceName : SPSearch4
      MaxBackupDuration : 2880
      CrawlAccount :
      AddStartAddressForNonNTZone : False
      PerformanceLevel : PartlyReduced
      Status : Online

      PS C:\> Get-SPSearchServiceInstance

      TypeName : SharePoint Foundation Search
      Description : Search index file on the search server
      Id : c0bd0fa4-a0d7-475a-aabb-1d81ad74f1a1
      Server : SPServer Name=sp2010
      Service : SPSearchService Name=SPSearch4
      IndexLocation :
      ProxyType : Default
      Status : Online

      • Søren Nielsen says:

        Reread the post.

        You should run the script provided (SetupEnterpriseSearch.ps1) which defines the function Start-EnterpriseSearch. How: in powershell write a dot followed by a space and then drag in the file. Blame powershell for that quirk 😉

        Start-EnterpriseSearch in turn calls the commandlets you mention and many more.

  32. Hello everyone!

    First off, thank you Søren Nielsen, this post helped me along my SharePoint journey a lot!

    I had to go through some pains before I got SharePoint installed and working the way I want. My requirement was to set up SharePoint 2010 as a standalone server in an environment with an existing AD and SQL Server. I finally got it all working, including search and a way to get data out of the existing SQL server into SharePoint without going crazy 🙂

    If anyone is interested, I have a brief post on how I set up the SharePoint side of things. Hopefully it helps someone.

    http://www.srikanthnair.com/2012/02/06/install-configure-standalone-sharepoint-2010-server/

    Sri

  33. jose says:

    Hi Soren.
    I’ve did all you wrote on the article but there’s something wrong with powershell.
    I’ll paste here the problem:
    ___________________________________________
    PS C:\SCRIPTS_MOSS\Search> $host.version

    Major Minor Build Revision
    —– —– —– ——–
    2 0 -1 -1

    PS C:\SCRIPTS_MOSS\Search> .\SetupEnterpriseSearch.ps1
    PS C:\SCRIPTS_MOSS\Search> Start-EnterpriseSearch searchconfig.xml
    The term ‘Start-EnterpriseSearch’ is not recognized as the name of a cmdlet, fu
    nction, script file, or operable program. Check the spelling of the name, or if
    a path was included, verify that the path is correct and try again.
    At line:1 char:23
    + Start-EnterpriseSearch <<<
    _____________________________________________

    I’ve just replaced the localhost and service account in the searchconfig.xml file. The SetupEnterpriseSearch.ps1 script is unchanged.

    • jose says:

      well i’ve put the ” character enclosing the cmdlet and it did not do nothing apparently.

      PS C:\SCRIPTS_MOSS\Search> “Start-EnterpriseSearch .\searchconfig.xml”
      Start-EnterpriseSearch .\searchconfig.xml
      PS C:\SCRIPTS_MOSS\Search>
      PS C:\SCRIPTS_MOSS\Search>

      I’ve put the complete path to the searchconfig.xml file and I had the same result.
      Is there a logfile where I can search the result of the command. The event viewer shows nothing.

    • Søren Nielsen says:

      This is a common source of confusion. As I wrote you need to write a dot and a space before the script.

      In this case you haven’t. Write . .\SetupEnterpriseSearch.ps1

      The dot space thing is called to “dot source” a script. The second dot just before the backslash is part of the file path and means “current directory”. Therefore you need both here.

      • jose says:

        thanks soren. i’ve solved that problem. i created a new service app and deleted the old one.
        now when i make a search, i see this error: “The search request was unable to connect to the Search Service”.

        I have a web app on port 80 using CBA (windows auth/NTLM and anonymous access enabled). I’ve edited the “Local sharepoint sites” content source to only crawl this web app.
        I have extended the web app to port 8080, using CBA (Forms based auth accessing a LDAP server). I’ve removed this web app from content source “Local sharepoint sites”.
        The enterprise search service application proxy is connected to both web apps.

        When I try a search (with an authenticated local user) I am given the above error. Using ULS viewer I’ve got these messages:
        ____________________________
        Name=Request (GET:http://sp2010.do.ma.in:80/_layouts/OSSSearchResults.aspx?k=servi%C3%A7os&cs=This%20Site&u=http%3A%2F%2Fsp2010.do.ma.in)

        SPSecurityTokenService.PopulateOutputIdentity() failed to lookup UPN for user ‘SP2010\jose’: System.ComponentModel.Win32Exception: No mapping between account names and security IDs was done
        at Microsoft.SharePoint.Win32.SPSecur32.GetUserNameEx(EXTENDED_NAME_FORMAT nameFormat)
        at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.PopulateOutputIdentity(SPRequestInfo requestInfo, IClaimsIdentity outputIdentity)

        Site=/

        CoreResultsWebPart::OnInit: Exception initializing: Microsoft.Office.Server.Search.Query.SearchServiceNotFoundException: The search request was unable to connect to the Search Service.
        at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.GetProxy(SPServiceContext ServiceContext)
        at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader()
        at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)

        FetchDataFromURL start at(outside if): 1 param: start

        Exception while trying to create RemoteScopes. Returning scope cache as null. ex Microsoft.Office.Server.Search.Query.SearchServiceNotFoundException: The search request was unable to connect to the Search Service.
        at Microsoft.Office.Server.Search.Administration.RemoteScopes.Initialize(SPServiceContext serviceContext)
        at Microsoft.Office.Server.Search.Query.ScopeCache.GetScopeCache(SPServiceContext serviceContext)
        __________________________________

        I’ve been googling, but no having success. I hope I’m close to a solution.

        Thanks!

  34. Chris says:

    re: The Search Fix –> Thank you for making this available. Worked like a charm.

  35. Pingback: Install SharePoint 2013 on Windows Server 2012 without a domain - Visual Studio ALM with Team Foundation Server, Visual Studio & Scrum

  36. You are a god among men! This was positively brilliant. My Query Component was stuck and it drove me crazy until I found your blog. (Unfortunately, i found a lot of bad advise from lesser developers first. This is an odd problem, with cryptic errors and sparse documentation.

    THANK YOU, THANK YOU, THANK YOU.

  37. Michael Lennon says:

    This is fantasic. Worked for me on a server with no DC and using a farm complete install so that I could use existing SQL Server. Thank you!!

  38. Jiří Pelnař says:

    Hi Søren, I have spent almost 2 days trying to get the search service working – spending my time on google, installing hotfixes and trying to setup the service manually or using the configuration wizard many times with no result, when I found your solution and it worked smoothly as a charm. The search is finally working! 🙂 Thank you for this invaluably helpful post!! Brilliant!

  39. Pingback: SharePoint 2010 : Installer une ferme avec authentification SQL « SharePoint by Asipe (Benoît Jester)

  40. Akuma says:

    Hi Soren,

    Thank you very much for your post!!. I’m trying to get this working but unfortunately I tried many things to no available.

    The problem is that I’m using a bit different platform and maybe I’ve missed something that is not here.

    I’ve installed SharePoint Foundation 2010 the same way as you (all in the same server without a domain). After that I’ve also installed Server Search 2010 Express so I can use the FAST search feature.

    The problem is that I apply your solution but the “PropertyDB” still hangs on ‘initializing’.

    Do you have any clue or thing that I could try to fix it?

    Thank you very much in advance.

    Cheers,
    Akuma

    • Well the problem is likely the same. Trouble is that scripted configuration of the fast engine is different. While the problem may be the same, the same script simply does not apply as it’s different service application.

      I don’t have one for fast.

  41. Jonathan says:

    Great article and got my SSA to initialize. What I’m having problems with is with how to associate this SSApp with my web application as it doesn not appear as a choice. Any ideas?

    • sorry for late response. i’m sure you have resolved it by now.

      If not then you can always associate it with the web application within the central administration. It’s on the manage web applications page.

Leave a comment