Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

6 thoughts on “How to Change Service Accounts in SharePoint Server using PowerShell?

  • Hi Rajack

    I enter”Get-SPServiceInstance | Where {$_.TypeName -eq “Microsoft Project Server Calculation Service”}”,But I can’t get any results.
    How can i change account for “Microsoft Project Server Calculation Service”?
    Thank You!!

    Reply
      • Hi Rajack

        Yes, I Use “Get-SPServiceInstance” to find out It is”Project Server Application Service”
        But, I ran the “PowerShell script to Change Service Accounts in SharePoint”, then Get an error
        “Property ‘Username’ cannot be found on this object; make sure it exists and is settable.”
        Actully I think it’s reasonable, because I didn’t enable or create project server instance.
        But when I used Central administration > Configure Managed Accounts,and want to delete old service account,I will get an error:
        The account DOMAIN\Services is still being used by these components:
        Microsoft Project Server Calculation Service
        Microsoft Project Server Event Service
        Microsoft Project Server Queue Service

        It make me so confused.
        Any reply will help,thanks!

        Reply
        • Hi together,

          we found a solution. Use this code snippet:

          $farm = get-spfarm
          $farm.Services|?{$_.TypeName -like “*Project*”}| select TypeName

          $ServiceAccountName = “DOMAIN\AccountName”
          $ProSvcs = @(“Microsoft Project Server Queuing Service”, “Microsoft Project Server Calculation Service”, “Microsoft Project Server Events Service”)
          $ProSvcs | % {
          $ProjectService = ( $farm.Services | ? {$_.TypeName -eq $_ }| select TypeName).TypeName
          $svc = $farm.Services | ? { $_.TypeName -eq $ProjectService }
          $svc.ProcessIdentity.Username = $ServiceAccountName
          $svc.ProcessIdentity.Update()
          }

          Reply
  • Hi Rajack

    I enter”Get-SPServiceInstance | Where {$_.TypeName -eq “Microsoft Project Server Calculation Service”}”,But I can’t get ant results.
    How can i change account for “Microsoft Project Server Calculation Service”?

    Reply
  • Very helpful, thanks!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *