Change the Caching Service Account (AppFabric 1.1 Caching)
Microsoft AppFabric 1.1 for Windows Server allows you to run the AppFabric Caching Service as a built-in account or as a custom domain account. Running the service as a custom domain account was previously not supported in Windows Server AppFabric v1.0. This topic describes how to change the AppFabric Caching Service account using two methods:
The service account must be updated on each cache host individually, and each cache host must be stopped prior to the changes. The easiest way to accomplish this is to use the Stop-CacheCluster Windows PowerShell command to stop all hosts in the cluster. However, you can choose to leave the cache cluster running and update the servers sequentially by using Stop-CacheHost, updating that cache host, and then using Start-CacheHost before moving to the next server.
|It is not recommended to use a custom service account with Administrator privileges on the cache host.|
|You must stop the cache cluster if you are changing between a built-in account, such as NETWORK SERVICE, to a custom account, such as a domain account. You also should restart cache client applications in this scenario.|
Using the Configuration Wizard
The Configuration Wizard allows you to update the AppFabric Caching Service with a user interface.
On the Start Menu, select Microsoft AppFabric 1.1 for Windows Server, and then click Configure AppFabric.
Proceed through the configuration steps until you get to the Caching Service section.
Select the Set Caching Service configuration check box.
Click the Change button next to the Caching Service account text box.
In the Select User dialog box, enter the account information and click OK.
Select the Caching Service configuration provider and point to the current configuration store for the current cache cluster.
Select the Join cluster radio button.
Click Next, and complete the caching service configuration to apply the changes to the AppFabric Caching Service account.
Start the cache host with either Start-CacheHost or Start-CacheCluter Windows PowerShell commands.
Using Windows PowerShell
The following steps show another technique for changing the AppFabric Caching Service account by using Windows PowerShell. For information on how to use the configuration commands below, see Automated Installation and Configuration (AppFabric 1.1 Caching).
If the target cache host is still running, stop the cache host with Stop-CacheCluster or Stop-CacheHost.
Stop-CacheHost CacheServer1 22233
Use UnRegister-CacheHost to remove the cache host from the cache cluster.
Unregister-CacheHost -Provider System.Data.SqlClient -ConnectionString "Data Source=SQLSERVER1;Initial Catalog=CachingDB;Integrated Security=True" -HostName CacheServer1
Use Remove-CacheHost to remove the cache host configuration from the server. This command must be run from the target cache host.
Change the service account using the Services Administrative Tool or by using the sc.exe command.
sc.exe config AppFabricCachingService obj= DOMAIN\user1 password= user1_password
Important If you use a custom service account, it must have the Log on as a service right. For more information on how to grant this right, see Add the Log on as a service Right to an Account.
Use Add-CacheHost to configure the cache host. Specify the new account with the Account parameter.
Add-CacheHost -Provider System.Data.SqlClient -ConnectionString "Data Source=SQLSERVER1;Initial Catalog=CachingDB;Integrated Security=True" -Account "DOMAIN\user1"
Use Register-CacheHost to register the cache host with the cache cluster. Specify the new account with the Account parameter.
Register-CacheHost -Provider System.Data.SqlClient -ConnectionString "Data Source=SQLSERVER1;Initial Catalog=CachingDB;Integrated Security=True" -Account "DOMAIN\user1" -CachePort 22233 -ClusterPort 22234 -ArbitrationPort 22235 -ReplicationPort 22236 -HostName CACHESERVER1
Start the cache host with either Start-CacheHost or Start-CacheCluter.