When creating new objects in ADSI from a class, I can see what properties
are mandatory by browsing AD with ADVW, by use of the schema management
tool, or by refering to MSDN Library. MSDN does provide the most
information.

Still, it is not clear to me how one can tell, when instantiating a new
object, which of the mandatory fields must be populated by the script writer
and which the system will populate (such as Object-SID).

Are there any general guidelines I might share with a student?

Thanks,
JB Fields

Re: mandatory fields by Richard

Richard
Tue Apr 27 14:27:17 CDT 2004

JB Fields wrote:

> When creating new objects in ADSI from a class, I can see what properties
> are mandatory by browsing AD with ADVW, by use of the schema management
> tool, or by refering to MSDN Library. MSDN does provide the most
> information.
>
> Still, it is not clear to me how one can tell, when instantiating a new
> object, which of the mandatory fields must be populated by the script
writer
> and which the system will populate (such as Object-SID).
>
> Are there any general guidelines I might share with a student?

Hi,

The best I have found (other than trial and error or a code example) is to
check the attribute documentation at the following link:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adschema/ad/win2k_c_user.asp

Attributes for other classes of objects are in the TOC at the left. For each
attribute, if the "Update privilege" says "Domain Administrator", and it is
mandatory, then it must be set before commiting to AD. Anything else, like
"system" or "the designer of the object" or "schema administrator" really
means that either the value is set by the system or by the schema definition
of the class. I have not discovered a way to determine this programmatically
from the schema.

--
Richard
Microsoft MVP Scripting and ADSI
HilltopLab web site - http://www.rlmueller.net
--



Re: mandatory fields by JB

JB
Tue Apr 27 15:13:48 CDT 2004


"Richard Mueller [MVP]" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in
message news:#710u3ILEHA.2976@TK2MSFTNGP10.phx.gbl...
> JB Fields wrote:
>
> > When creating new objects in ADSI from a class, I can see what
properties
> > are mandatory by browsing AD with ADVW, by use of the schema management
> > tool, or by refering to MSDN Library. MSDN does provide the most
> > information.
> >
> > Still, it is not clear to me how one can tell, when instantiating a new
> > object, which of the mandatory fields must be populated by the script
> writer
> > and which the system will populate (such as Object-SID).
> >
> > Are there any general guidelines I might share with a student?
>
> Hi,
>
> The best I have found (other than trial and error or a code example) is to
> check the attribute documentation at the following link:
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adschema/ad
/win2k_c_user.asp
>
> Attributes for other classes of objects are in the TOC at the left. For
each
> attribute, if the "Update privilege" says "Domain Administrator", and it
is
> mandatory, then it must be set before commiting to AD. Anything else, like
> "system" or "the designer of the object" or "schema administrator" really
> means that either the value is set by the system or by the schema
definition
> of the class. I have not discovered a way to determine this
programmatically
> from the schema.
>
> --
> Richard
> Microsoft MVP Scripting and ADSI
> HilltopLab web site - http://www.rlmueller.net
> --

Woops, I think it moved somewhere else... Gives me the idea, though.
Thanks!



Re: mandatory fields by v-raygon

v-raygon
Wed Apr 28 01:07:59 CDT 2004

Hi,
I agree with the answer from Richard.

In addition, there are a "must-contain" list for some AD objects. For example we can find user's "Mandatory" list at
following page (in Attributes section Mandatory == true ):http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/adschema/adschema/classes_all.asp
//get following Mandatory attributes
cn instanceType nTSecurityDescriptor objectCategory objectClass objectSid sAMAccountName

Complete information on AD classes can be found at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adschema/adschema/classes_all.asp

Have a nice day!
Rhett Gong [MSFT]
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.


Re: mandatory fields by JB

JB
Wed Apr 28 08:45:44 CDT 2004


"Rhett Gong [MSFT]" <v-raygon@online.microsoft.com> wrote in message
news:VAZDjcOLEHA.3900@cpmsftngxa10.phx.gbl...
> Hi,
> I agree with the answer from Richard.
>
> In addition, there are a "must-contain" list for some AD objects. For
example we can find user's "Mandatory" list at
> following page (in Attributes section Mandatory ==
true ):http://msdn.microsoft.com/library/default.asp?
> url=/library/en-us/adschema/adschema/classes_all.asp
> file://get following Mandatory attributes
> cn instanceType nTSecurityDescriptor objectCategory objectClass
objectSid sAMAccountName
>
> Complete information on AD classes can be found at:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adschema/ad
schema/classes_all.asp
>
> Have a nice day!
> Rhett Gong [MSFT]
> Microsoft Online Partner Support
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Please reply to newsgroups only. Thanks.

Great.

It is a comfort to begin to know more about what some of these resources are
saying.

Thanks, both of you, for the help.
J