You want to generate a GUID to use for the
schemaIDGUID attribute of a new class or attribute
you intend to add to the schema.
There are several ways to go about generating a GUID. If you do not
schemaIDGUID when initially creating a
class or attribute, one will automatically be generated for you. So
you could add the class or attribute to the schema of a test forest,
and then use the
schemaIDGUID that was generated
in that forest.
You can also programmatically generate a GUID using Perl, VB, C++, or
C#, but you cannot do it natively within VBScript. The Windows API
CoCreateGUID method that can be used to
generate a GUID. If you are stuck with VBScript, you can wrap the
CoCreateGUID method in an ActiveX DLL using VB and
then use that DLL from within VBScript.
Finally, you can use a tool such as
which is available in the Microsoft Platform SDK to generate GUIDs.
Uuidgen doesn’t require any
parameters (although there are a few options that can be seen by
-h), and it can
generate as many GUIDs as you need.
If you intend to use LDIF files for extending the schema (highly recommended), then you need to encode any GUIDs in base64 notation. This is necessary because GUIDs are stored as octet strings (binary data) in Active Directory. The LDIF specification requires any binary data to be encoded in base64. Again, VBScript does not support base64 encoding natively, but ...