Please enable JavaScript to view this site.

PrimalScript - Help Manual

PrimalScript includes a convenient ADSI Wizard that makes writing Active Directory Services Interface scripts easier for you. The ADSI Wizard only produces code in VBScript.

Using the ADSI Wizard

Launch the ADSI Wizard by selecting the Tools ribbon > in the Wizards section, select ADSI Wizard.

 In order to open the ADSI Wizard you must have a .vbs file currently open.

Tell the Wizard which ADSI objects you want to work with: Users, Contacts, Computers, Organizational Units, or Groups. For each type of object, you can have the Wizard produce sample code showing how to add, delete, or modify objects.

The Wizard creates a new class for each type of object selected as well as a generic ADSIConnection class which connects to ADSI. The code added by the Wizard is pre-folded.

Additional sample code demonstrates how to use the new classes to query and work with ADSI objects.

To begin

Declare a variable which will represent a retrieved ADSI object. Set the variable equal to a new instance of the appropriate class (e.g., Set objUser = New ADSIUser)

To retrieve an object

Use the appropriate method of objADSI. The first argument of the "Get" method (such as GetUser) should be an object variable that will represent the retrieved object.

To work with an object

Use the methods of the newly-retrieved object.

To assist you, the classes added by the ADSI Wizard all support PrimalSense. For example, the objADSI variable supports methods for dealing with all of the object types you selected in the Wizard.

Pop-up tool tips help remind you of the correct syntax for using each class.

The objects will also display PrimalSense code hinting to help you select the appropriate property or method.

Rather than attempting to write scripts for you, the ADSI Wizard creates code that makes ADSI scripting easier by providing objects which represent specific classes, including full PrimalSense support and makes ADSI scripting more intuitive and direct.

 

See also:

WMI Wizard

ADO Wizard

Getting Help

 

SAPIEN Technologies, Inc. provides administrative tools to support all of your Windows scripting needs.