-
Notifications
You must be signed in to change notification settings - Fork 107
SPServiceIdentity
Yorick Kuijs edited this page Feb 14, 2018
·
13 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name | Key | string | The name of the service instance to manage | |
ManagedAccount | Required | string | The user name of a managed account, LocalService, LocalSystem or NetworkService that will be used to run the service | |
InstallAccount | Write | PSCredential | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsAccount if using PowerShell 5 |
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.
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
}
}
}
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations