Using PowerShell to add samAccountName attribute to ADLDS

I am running an instance of ADLDS (Active Directory Lightweight Directory Services) on Windows Server 2012 R2 and I found this LDIF file that contains the samAccountName attributes: https://gist.github.com/jakeballard/9124822/download#

However, when I attempt to use the LDIFDE command with the .ldif file, it fails with an error of:

"Failed on line 1.  The last token starts with ?"

Instead, of trying to troubleshoot what is wrong with the .ldif file and using the LDIFDE command, I was wondering if there is a good replacement PowerShell Active Directory CmdLet that will allow me to accomplish the same thing in regards to extending the ADLDS schema with the samAccountName attribute.

I found this list of AD PowerShell Cmdlets, but none of them seem to indicate which one will allow me to extend the ADLDS schema with the samAccountName attribute: https://technet.microsoft.com/en-us/library/ee617195.aspx

Please advise.

Thanks. 

April 23rd, 2015 10:05pm

Hi,

>>Instead, of trying to troubleshoot what is wrong with the .ldif file and using the LDIFDE command, I was wondering if there is a good replacement PowerShell Active Directory CmdLet that will allow me to accomplish the same thing in regards to extending the ADLDS schema with the samAccountName attribute.

Based on my knowledge, PowerShell may not help us here. Nevertheless, we can try the solution provided by Joe as described in the following post.

Adding sAMAccountName and sAMAccountType to ADAM/ADLDS directories

http://blog.joeware.net/2011/03/04/2214/

AdFind

http://www.joeware.net/freetools/tools/adfind/

AdMod

http://www.joeware.net/freetools/tools/admod/

Best regards,
Frank Shen

Free Windows Admin Tool Kit Click here and download it now
April 26th, 2015 11:21pm

I found this posting but I have no idea how to customize the PowerShell to add the samAccountName attribute: ok-sandbox.com/2014/11/extending-active-directory-schema-store-application-configuration-powershell-examples/

Also, according to this posting, we should not need LDIFDE any longer: https://dmitrysotnikov.wordpress.com/2007/09/03/11-essential-ad-tools-replaced-with-powershell/

April 30th, 2015 4:50pm

Hi,

Before going further, sorry for the delayed response.

>>I found this posting but I have no idea how to customize the PowerShell to add the samAccountName attribute: ok-sandbox.com/2014/11/extending-active-directory-schema-store-application-configuration-powershell-examples/

For PowerShell questions, in order to get better help, it's recommended that we ask for suggestions in the following dedicated PowerShell forum.

Windows PowerShell

https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverpowershell

Best regards,
Frank Shen

Free Windows Admin Tool Kit Click here and download it now
May 5th, 2015 2:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics