en-US/about_SPServiceIdentity.help.txt

.NAME
    SPServiceIdentity
 
# Description
     
    **Type:** Distributed
     
    This resource is used to specify a managed account to be used to run a service instance.
    You can also specify LocalService, LocalSystem or NetworkService as ManagedAccount.
    The name is the typename of the service as shown in the Central Admin website.
    This resource only needs to be run on one server in the farm, as the process identity
    update method will apply the settings to all instances of the service.
     
.PARAMETER Name
    Key - string
    The name of the service instance to manage
 
.PARAMETER ManagedAccount
    Required - string
    The user name of a managed account, LocalService, LocalSystem or NetworkService that will be used to run the service
 
.PARAMETER InstallAccount
    Write - String
    POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsAccount if using PowerShell 5
 
 
.EXAMPLE
    This example shows how to set the SandBox Code Service to run under a specifed service account.
    The account must already be registered as a managed account.
 
 
Configuration Example
    {
        param(
            [Parameter(Mandatory = $true)]
            [PSCredential]
            $SetupAccount
        )
 
 Import-DscResource -ModuleName SharePointDsc
 
        node localhost {
  
            SPServiceIdentity SandBoxUserAccount
            {
                Name = "Microsoft SharePoint Foundation Sandboxed Code Service"
                ManagedAccount = "CONTOSO\SPUserCode"
                PsDscRunAsCredential = $SetupAccount
            }
        }
    }