DSCResources/DSC_SqlServiceAccount/en-US/about_SqlServiceAccount.help.txt

.NAME
    SqlServiceAccount
 
.DESCRIPTION
    The `SqlServiceAccount` DSC resource manages the service account for SQL
    Server services.
 
    ## Requirements
 
    * Target machine must have access to the SQLPS PowerShell module or the SqlServer
      PowerShell module.
 
    ## Known issues
 
    All issues are not listed here, see [here for all open issues](https://github.com/dsccommunity/SqlServerDsc/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+SqlServiceAccount).
 
.PARAMETER InstanceName
    Key - String
    The name of the SQL Server instance to be configured.
 
.PARAMETER ServiceType
    Key - String
    Allowed values: DatabaseEngine, SQLServerAgent, Search, IntegrationServices, AnalysisServices, ReportingServices, SQLServerBrowser, NotificationServices
    The service type to be managed for the instance that is specified in parameter InstanceName.
 
.PARAMETER ServiceAccount
    Required - Instance
    The service account that should be used when running the Windows service.
 
.PARAMETER ServerName
    Write - String
    The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME.
 
.PARAMETER RestartService
    Write - Boolean
    Determines whether the service is automatically restarted when a change to the configuration was needed.
 
.PARAMETER Force
    Write - Boolean
    Forces the service account to be updated. Useful for password changes. This will cause Set to be run on each consecutive run.
 
.PARAMETER ServiceAccountName
    Read - String
    Returns the service account username for the service.
 
.PARAMETER VersionNumber
    Write - String
    The version number for the service type to be managed for the instance that is specified in parameter InstanceName. Mandatory when parameter ServiceType is set to 'IntegrationServices'.
 
.EXAMPLE 1
 
This example shows how to ensure the SQL Server service
on TestServer is running under a user account.
 
Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [System.Management.Automation.PSCredential]
        $ServiceAccountCredential
    )
 
    Import-DscResource -ModuleName 'SqlServerDsc'
 
    Node localhost
    {
        SqlServiceAccount 'SetServiceAccount_User'
        {
            ServerName = 'TestServer'
            InstanceName = 'MSSQLSERVER'
            ServiceType = 'DatabaseEngine'
            ServiceAccount = $ServiceAccountCredential
            RestartService = $true
        }
    }
}
 
.EXAMPLE 2
 
This example shows how to ensure the SQL Server service
on TestServer\DSC is running under a virtual account.
Force will cause this account to be set every time the
configuration is evaluated. Specifying RestartService will
cause the service to be restarted.
 
Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [System.Management.Automation.PSCredential]
        $ServiceAccountCredential
    )
 
    Import-DscResource -ModuleName 'SqlServerDsc'
 
    Node localhost
    {
        SqlServiceAccount 'SetServiceAccount_User'
        {
            ServerName = 'TestServer'
            InstanceName = 'DSC'
            ServiceType = 'DatabaseEngine'
            ServiceAccount = $ServiceAccountCredential
            RestartService = $true
            Force = $true
        }
    }
}