For those who are struggling to create service accounts:
Open PowerShell
Import-Module Activedirectory
Create the Service Account:
New-ADServiceAccount -name <Service Account Name> -Enabled $true -DNSHostName <Service Account Name>.domain.com -PrincipalsAllowedToRetrieveManagedPassword “<Group or Computer>”
Example:
New-ADServiceAccount -name MSA1 -Enabled $true -DNSHostName MSA1.domain.com -PrincipalsAllowedToRetrieveManagedPassword “Sql Server Group”
Add computer to service account:
Add-ADComputerServiceAccount -Identity <Servername> -ServiceAccount <Service Account Name>$
Example:
Add-ADComputerServiceAccount -Identity SQL1 -ServiceAccount MSA1$
Install Service Account:
Install-ADServiceAccount -Identity <Service Account Name>$
Example:
Install-ADServiceAccount -Identity MSA1$
To test to see if this has worked:
Test-ADServiceAccount -Identity <Service Account Name>$
Example:
Test-ADServiceAccount -Identity MSA1$
Great post really clear. I do have one question what rights do I need to perform these actions?
Do I have to be a Domain Admin or can I manage this with less?