About Me

Having 12 years experience in Microsoft technologies.Since more than 7 years working in SharePoint technologies. Expert in providing consultation for SharePoint projects. Hands on with development and administration.
Showing posts with label windows token. Show all posts
Showing posts with label windows token. Show all posts

Tuesday, 3 February 2015

Update SharePoint 2010/2013 - Claims to Windows token - service identity(account) using PowerShell Commands

Sometimes it is required to update/modify identity (account) for services in SharePoint 2010/2013.
In this article, I will show you - how to update the identity of 'Claims to Windows token service' using PowerShell
Note:
1. Replace <Account Name> with your own account (identity)
2. Replace "Claims to Windows Token Service" with your own service name
3. Run the script in windows PowerShell console
----------------------------------------------------------------------------------------------------------------------------------
#SharePoint PowerShell SnapIn Required
Add-PSSnapin Microsoft.SharePoint.PowerShell
 
[string] $Identity = "<Account Name>"
[string] $ServiceTypeName = "Claims to Windows Token Service"
 
#Get Reference to Service
$Service = (Get-SPFarm).services | where {$_.typename -eq $ServiceTypeName}
 
#Get Reference to Managed Account
$IdentityManagedAcct = Get-SPManagedAccount -Identity $Identity
 
#Get Reference to Process Identity and Update Identity
$SvcProcessIdentity = $Service.ProcessIdentity
$SvcProcessIdentity.CurrentIdentityType = [Microsoft.SharePoint.Administration.IdentityType]::SpecificUser
$SvcProcessIdentity.Username = $IdentityManagedAcct.UserName
$SvcProcessIdentity.Update()
$SvcProcessIdentity.Deploy()
--------------------------------------------------------------------------------------------------------------------------------
Tip1: Following command let to view all services in the farm
Get-SPServiceInstance
Tip2: Confirm your Id by running the following cmdlet
Get-SPServiceInstance -identity <Paste the Id>
Another way of doing the same job from Central Administration
CA--> Security--> Configure Service Accounts
 
Select the service, which you want to update
 
 
 
Update the account and click ‘OK’
 
 
Cheers!
Vamsi