Tuesday, November 5, 2013

SharePoint 2013 : Change Service Account for Distribute Cache- AppFabricCachingService

שלום חברים,

היום נתקלתי בהודעה ב -Health Analyzer שמתריעה על Service בשם " Distributed Cache".
כאשר AppFabric מותקן כחלק מדרישות הקדם של SharePoint, הוא מוגדר לפעול תחת האישורים של חוות השרתים. זה לא אידיאלי, ובסופו של דבר יגרום להפרה של כלל ב- Health Analyzer.

כדי להימנע מכך, יש צורך לשנות את חשבון המשתמש שמריץ את השירות של Distributed Cache וניתן לעשות זאת רק בעזרת PowerShell.

בדוגמא הבאה, אנחנו מאחזרים את החשבון המנוהל הנוכחי הרשום בחווה (החשבון איתו נרצה להריץ את השירות), לאחר מכן, נקבע כי ה- Managed Account של אובייקט Process Identity של שירות ה- Distributed Cache.

להלן ה-Script :
$farm = Get-SPFarm
$cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"}
$accnt = Get-SPManagedAccount -Identity "Domain\User Account"  # Change the User Account Value.
$cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
$cacheService.ProcessIdentity.ManagedAccount = $accnt
$cacheService.ProcessIdentity.Update()

בהצלחה !
רון נס.


============================================================================================================================================================================================================================================================




Hello Friends,

Distributed Cache Service Account
When AppFabric is installed as part of the SharePoint pre-requisites, it is configured to run under the credentials of the server farm. This is far from ideal, and will eventually trigger a violation of a Health Analyzer Rule. 

To avoid this, you can change the account used by the Distributed Cache service.

In the example below, we’re retrieving a managed account that has already been registered with our farm, We then set that as the Managed Account property of the Process Identity object of the Distributed Cache (“AppFabricCachingService”) SPService.

The script:

$farm = Get-SPFarm
$cacheService = $farm.Services | where {$_.Name -eq "AppFabricCachingService"}
$accnt = Get-SPManagedAccount -Identity "Domain\User Account"  # Change the User Account Value.
$cacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
$cacheService.ProcessIdentity.ManagedAccount = $accnt
$cacheService.ProcessIdentity.Update()

Good Luck :)

Ron Ness.

No comments:

Post a Comment