Hi friends.
When you get the annoying pink marker in CA and one of the issues it warns you about, is that ‘the farm account should not be used for other services’ In my case, the scripted install had set the ‘Distributed Cache Service (Windows Service)’ to use the farm account as managed account. As the 2013 Central Admin is (or tries to be) helpful, it gives you the direct link to the: ‘Security’ – ‘General Security’ – ‘Configure Service Accounts’ and tells you to change it there.
To fix it, just click the link, find the service in the dropdown and select another Managed account in the lower dropdown. Then click ok…..but nooo…that one wont fly.
Changing the service account on this service cannot be done this way and has to be done using PowerShell…thats what you get back.
Well…after some short researching I found this to work ok: (first load the snapin, add-pssnapin microsoft.sharepoint.powershell)
$farm = Get-SPFarm
$cacheService = $farm.Services | where {$_.Name -eq “AppFabricCachingService”}
$accnt = Get-SPManagedAccount -Identity <domain\user>
$cacheService.ProcessIdentity.CurrentIdentityType = “SpecificUser”
$cacheService.ProcessIdentity.ManagedAccount = $accnt
$cacheService.ProcessIdentity.Update()
$cacheService.ProcessIdentity.Deploy()
(Where <domain\user> is the domain name and user name of the managed account you want to use instead.)
Note: Beware of the doublequotes if you copy the code…
Wait until it has run, then you will find that the service has a new managed account.
Go back to the Health Analyzer report page and remove the alert.
More on the Distributed Cache:
Manage the Distributed Cache service in SharePoint Server 2013
http://technet.microsoft.com/en-us/library/jj219613(v=office.15).aspx#changesvcacct
_________________________________________________________
Enjoy!
Regards
hi,
I tried this but at the last step (deploy()) it keep telling me that it does not like deploy() without any arguments. the admin Service is running!
Exception calling “Deploy” with “0” argument(s): “This operation uses the
SharePoint Administration service (spadminV4), which could not be contacted.
If the service is stopped or disabled, start it and try the operation again.”
At line:1 char:1
+ $cacheService.ProcessIdentity.Deploy()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : InvalidOperationException
Sorry, my Bad!
I used the wrong account to run this script -.-
It worked with the local Administration Account.
Hi Dirk.
Glad you solved it.
Regards
// Thomas
I appreciate these instructions on how to get this set using powershell.
It really got me frustrated when I got the heath warning to change the account and it sent me to Service account config page as you say. and then directs me that I have to do that with powershell. So why does it even give me the option? The more I do stuff in SharePoint the more I cannot believe that it does such crazy things and people seem to be so happy that someone shows them how to jump the hurdles SharePoint puts in front of them.
ARRRRGH
sorry just venting
Mike J
Michael, couldn’t agree more…! 🙂
Imagine SharePoint without all the blogs…
I like to call SharePoint as a Product ‘Consultant friendly’.
But if I try to see why the product is the way it is, having been around SharePoint in different version for a very long time…
I think that Microsoft has put priority on adding features in high demand and also on fixing some major functionality issues instead of fixing the ‘annoying’ isues. But, I would like to see for example a really good redesigned Farm Configuration Wizard…what if they made it useful and it helped you make all of this right from the beginning…? Just thinking out load…
Regards // Thomas
Thanks for the post.
I get an error in the line “$cacheService.ProcessIdentity.ManagedAccount = $accnt $cacheService.ProcessIdentity.Update()” saying “Unexpected token ‘$cacheService’ in expression or statement”.
I have copied the script and only changed the . Did I misunderstand something?
Regards,
Jakob Rohde
Hi Jacob.
Sorry for that, my bad! It’s supposed to look like this:
$cacheService.ProcessIdentity.ManagedAccount = $accnt
$cacheService.ProcessIdentity.Update()
$cacheService.ProcessIdentity.Deploy()
I have updated the post now, thanks!
Try again and please let me know the outcome?
Regards // Thomas
what account do you recomend for this service?
Use a dedicated account, domain user.
Regards
// Thomas
I got the same error as Dirk just now:
Exception calling “Deploy” with “0” argument(s): “Cannot start service
AppFabricCachingService on computer ‘AUSDCSPT01.AD.OSN.COM’.”
At line:1 char:1
+ $cacheService.ProcessIdentity.Deploy()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : CmdletInvocationException
Except for the Fully Qualified Error ID. I was using an admin account to run these commands and I changed the service to another admin account. Any thoughts would be helpful.
I get the same error as Jack. I’ve tried everything, nothing works!
Thank YOU! THANK YOU! 🙂
🙂
Youre welcome!
// Thomas
If we’re in a Claims based environment do we need to do I:0#.w|Domain\username? or just domain\username?
Hi.
Most likely it is in the form domain\username
This can easily be checked, list the managed accounts you have by running:
Get-SPManagedAcccount
Good luck
Regards
// Thomas