Hi
I am using ADSI Edit to create Teradata users in ad. the process is to use ADSI Edit, got to the users branch right click and create new object. I then select GroupOfNames as the class, then I add the common name which is there logon name then I add their distinguishedName. I was wondering where I would start to create a powershell script to do this function? I am only and have only used powershell to modify groups or create new users or add them to global groups.
GroupOfNames object creation in ad
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: GroupOfNames object creation in ad
You cannot add a distinguished name. This is auto-genertated by AD.
Users are created in AD using the New-AdUser CmdLet. see help for the CmdLet.
http://technet.microsoft.com/en-us/libr ... 17253.aspx
GroupOfNames is only implemented on ADAM and LDS. Are you using
ADAM
http://msdn.microsoft.com/en-us/library/cc221556.aspx
Users are created in AD using the New-AdUser CmdLet. see help for the CmdLet.
http://technet.microsoft.com/en-us/libr ... 17253.aspx
GroupOfNames is only implemented on ADAM and LDS. Are you using
ADAM
http://msdn.microsoft.com/en-us/library/cc221556.aspx
Re: GroupOfNames object creation in ad
This is how to create an arbitrary object in ADAM or AD.
PowerShell Code
Double-click the code block to select all.$dom=[ADSI]"LDAP://CN=Users,dc=NA,dc=fabrikam,dc=com" $obj = $dom.Create('GroupOfNames', 'CN=SomeName' $obj.SetInfo()
- jrremillard
- Posts: 58
- Last visit: Sun Aug 08, 2021 7:42 am
- jrremillard
- Posts: 58
- Last visit: Sun Aug 08, 2021 7:42 am
Re: GroupOfNames object creation in ad
Hi
I get the following error
Exception calling "SetInfo" with "0" argument(s): "The requested operation did
not satisfy one or more constraints associated with the class of the object.
So I am probably doing something wrong.
the following is the path to the OU that the object is going to be created or the DN information of the user/
Mine is also a little different.
$dom=[ADSI]"LDAP://OU=Users,OU=dev,OU=tdev,dc=acme,dc=com"
$obj = $dom.Create('GroupOfNames', 'CN=ASmith')
$obj.SetInfo()
Where do I put the DN of the user?
Sorry if this is confusing.
I get the following error
Exception calling "SetInfo" with "0" argument(s): "The requested operation did
not satisfy one or more constraints associated with the class of the object.
So I am probably doing something wrong.
the following is the path to the OU that the object is going to be created or the DN information of the user/
Mine is also a little different.
$dom=[ADSI]"LDAP://OU=Users,OU=dev,OU=tdev,dc=acme,dc=com"
$obj = $dom.Create('GroupOfNames', 'CN=ASmith')
$obj.SetInfo()
Where do I put the DN of the user?
Sorry if this is confusing.