We all probably know how to give application pool account permissions to search service application through central admin. But i want to do this using Powershell. What will be the Powershell script to accomplish this?

1 Answer 1


try this one

$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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.