How to Stop 'Search Service Application' & 'State Service' using PowerShell in SharePoint Server?

Snehal Sutar 0 Reputation points
2025-01-28T06:04:11.43+00:00

How to Stop 'Search Service Application' & 'State Service' using powershell,

Tried Suspend-SPEnterpriseSearchServiceApplication but it's not working still showing status 'Online'.What other ways are there to stop the 'Search Service Application'?

Example:

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity 'Search Service Application'

$ssa | Suspend-SPEnterpriseSearchServiceApplication Similarly, we are not getting output for Dismounting 'State Service', is there any way to stop 'State Service' & 'Search Service Application' in SharePoint Server. We are using SharePoint Server Subscription Edition.

This is urgent, so quick reply is appreciated!

Thank You

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,414 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,153 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,781 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 27,966 Reputation points Microsoft Vendor
    2025-01-28T08:00:04.5966667+00:00

    Hi @Snehal Sutar ,

    Suspends a search service application, pausing all crawls and search operations, to perform a task such as system maintenance:

    $ssa = Get-SPEnterpriseSearchServiceApplication -Identity MySSA $ssa | Suspend-SPEnterpriseSearchServiceApplication
    

    Steps to suspension of search service applications:

    1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
    2. Start a SharePoint Management Shell on one of the servers in the farm.
    3. At the Microsoft PowerShell command prompt, type the following command(s) to find out if the Search service application is paused. PowerShellCopy
         $ssa.IsPaused() -ne 0
      
      If this command returns False, the Search service application is running. If this command returns True, the Search service application is paused.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.