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
|
No comments:
Post a Comment