locked
How to add an administrator for search service application sharepoint 2013 Powershell RRS feed

  • Question

  • Hi 

    I have changed my default access account for Enterprise search crawl:

    $ServiceApplication | Set-SPEnterpriseSearchServiceApplication -DefaultContentAccessAccountName $searchAccount -DefaultContentAccessAccountPassword $serviceAccountPassword -Debug:$false

    I need to make the account $Searchaccount (domain\spcrawl) an administrator of the search service application in Powershell.

    Does anyone know the command?

    br

    Bjorn

    Sunday, February 3, 2013 4:21 PM

Answers

  • Hi Bjorn

    try this

    $principal = New-SPClaimsPrincipal "contoso\jane" -IdentityType WindowsSamAccountName
    $spapp = Get-SPServiceApplication –Name "Contoso Visio Graphics"
    $security = Get-SPServiceApplicationSecurity $spapp –Admin
    Grant-SPObjectSecurity $security $principal "Full Control"
    Set-SPServiceApplicationSecurity $spapp $security –Admin
    (Get-SPServiceApplicationSecurity $spapp -Admin).AccessRules

    Instead of visio you can provide search services app, for more details check this link

    http://technet.microsoft.com/en-us/library/ee704546.aspx


    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

    Sunday, February 3, 2013 5:43 PM

All replies

  • Hi Bjorn

    try this

    $principal = New-SPClaimsPrincipal "contoso\jane" -IdentityType WindowsSamAccountName
    $spapp = Get-SPServiceApplication –Name "Contoso Visio Graphics"
    $security = Get-SPServiceApplicationSecurity $spapp –Admin
    Grant-SPObjectSecurity $security $principal "Full Control"
    Set-SPServiceApplicationSecurity $spapp $security –Admin
    (Get-SPServiceApplicationSecurity $spapp -Admin).AccessRules

    Instead of visio you can provide search services app, for more details check this link

    http://technet.microsoft.com/en-us/library/ee704546.aspx


    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

    Sunday, February 3, 2013 5:43 PM
  • Thanks Raghavendra!
    Sunday, February 3, 2013 6:39 PM