Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When using the PowerShell Cmdlets for creating and installing Managed Service Accounts, certain errors can be thrown. What does each error mean?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

New-ADServiceAccount

The name provided is not a properly formed account name

The SAM account name exceeds the 20 character limit. A $ is automatically appended when missing and counts towards this limit.

Examples:

New-ADServiceAccount abcdefghijklmno -SamAccountName abcdefghijklmnopqrst
New-ADServiceAccount abcdefghijklmnopqrs -SamAccountName abcdefghijklmnopqrst
New-ADServiceAccount abcdefghijklmnopqrst -SamAccountName abcdefghijklmnopqrst

Install-ADServiceAccount

Cannot install service account. Error Message: 'Unknown error (0xc0000022)'.

Right click on the PowerShell shortcut and choose Run as Administrator.


Cannot install service account. Error Message: 'Unknown error (0xc0000106)'.

The SAM account name is within the 20 character limit, but its full name exceeds this limit.

Examples:

New-ADServiceAccount abcdefghijklmnopqrst -SamAccountName abcdefghijklmno
New-ADServiceAccount abcdefghijklmnopqrst -SamAccountName abcdefghijklmnopqrs

Cannot install service account. Error Message: 'Unknown error (0xc0000017)'.

The full name and the SAM account name are within the 20 character limit, but both of them exceed the NetLogon 15 characters limit.

Examples:

New-ADServiceAccount abcdefghijklmnopqrs -SamAccountName abcdefghijklmnopqrs

Cannot install service account. Error Message: 'Unknown error (0xc0000225)'.

The full name and the SAM account name are within the 20 character limit, but one of them exceeds the NetLogon 15 character limit.

Examples:

New-ADServiceAccount abcdefghijklmno -SamAccountName abcdefghijklmnopqrs
New-ADServiceAccount abcdefghijklmnopqrs -SamAccountName abcdefghijklmno

Sources used in addition to own research:

share|improve this answer
    
I've tested above findings multiple times, so there shouldn't be any mistake. If you do find a mistake, please let me know. –  Stijn Apr 1 at 13:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.