Link to home
Start Free TrialLog in
Avatar of Gareth McKee
Gareth McKeeFlag for Canada

asked on

Create a managed service account

Hi,

I am trying to create a managed service account on a domain controller in AD using powershell to use across the domain.

I am using the first example here https://blogs.technet.microsoft.com/activedirectoryua/2009/01/29/create-managed-service-accounts-with-powershell-do-not-create-managed-service-accounts-with-active-directory-users-and-computers/

I enter the code and then I am asked for the DNSHostName which I enter the FQDN of the DNS server/AD Server

I receive the error:

New-ADServiceAccount : Key does not exist
At line:1 char:1
+ New-ADServiceAccouint -name NameOfAccount -Path "CN=Managed Service Accounts,DC=IM .....
+ ....................................................................................................................................................................
     + CategoryInfo     : NotSpecified: (CN=AccountName...EndOfDomainName,DC=local) [New-ADServiceAccount], ADException
     + FullyQualifiedErroID : ActiveDirectoryServer:-2146893811,microsoft,activedirectory,management,commands,newadserviceaccount

What am I doing wrong?
Thanks
Gareth
ASKER CERTIFIED SOLUTION
Avatar of Rich Weissler
Rich Weissler

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial