Loading....
Recent Article links:

2. Preparing User / Group / Computer and OU objects

YaLS user commands

Command Explanation
MAPPING: Name of Active Directory Share Object
Any AD share object that is given after the : is going to be mapped to a driveletter, when that driveletter is defined in the keywords of that share object.
It would probably be a hell for you making all those personal user share objects, so that’s why the driveletter:\servershare format is also allowed.
For example:
MAPPING: Programs,H:\srv1.contoso.localnico$
If the networkdrive already exists on the client, it is going to be disconnected before connecting it to the share defined here.
When you just add an UNCPath instead of an Active directory share object, it is going to appear in My Network Places, furthermore, anything you type before the uncpath, that isn’t a driveletter, is going to be the description in My Network Places.
NOMAPPING: Name of Active Directory Share Object
If you want to filter out the problems wildcards give you, or want to create an exception, this is your command :) .
EXECUTE: Full path to executeable/script
Everything put in here is going to be executed just before YaLS is exiting. So YaLS doesn’t wait for the script or program to finish. No wildcard is allowed here, but variables are. The path may contain a networkdriveletter, unc or localpath.
FIRSTLOGON: Full path to executeable/script
This executeable/script is going to be executed the first time a new created domain user logs on. This can be used for example, for user instruction about how the network works and what the user’s email adress is. Or for example settings (such as Outlook) in the newly created user’s profile.
NOEXECUTE: Full path to executeable/script
If you want to create an exception for the EXECUTE or FIRSTLOGON command.
PRINTER: Name of printer
All active directory printers mentioned here, are going to be accessable for the user in windows. (in order to work, printers must be published in active directory)
LOCPRINTER: Location of printer
Searches in the location field for this location of every published printer. This can be a part of the whole string in the printer object.
LPTPRINTER: Name of printer
Use wildcard (*) with caution: possibility of more than one object.
This printer is going to be connected to LPT1 so it is going to be accessable for dos programs.
STANDARDPRINTER: Name of printer
Use wildcard (*) with caution: possibility of more than one object.
This printer is going to be selected as a default printer. (This can only be a printer object, and not a local printer)
NOPRINTER: Name of printer
If you want to filter out the problems wildcards give you, or want to create an exception, this is your command :) .
REMOVEDRIVES: Something here (ea TRUE)
Before mapping network drives, all already existing network drives are going to be disconnected.
REMOVEPRINTERS: Something here (ea TRUE)
Before connecting network printers, all already existing network printers are going to be disconnected. Even if it is connected to a LPT port
REMOVENETHOOD: Something here (ea TRUE)
Before connecting unc paths to shortcuts in My Network Places, all already existing shortcuts are going to be removed.
${Choose a name}: Anything you like
You can set your own variables. A silly example example on a group object description:
${JUSTANAME}: HP4N
And on an orangisation unit object description:
PRINTER: ${JUSTANAME}*-205
Now, any member of that group that is going to log on, it is going to connect to printer HP4N-205, but someone who is not a member of that group is going to be connected to HP4N-205 or to any other printer object that ends with -205, because of the wildcard.

There are also three predefined variables:

  • ${USERNAME} – The currently logged on user
    Example:

    MAPPING: H:srv1.consoso.local${USERNAME}$, My Map on the serversrv1.consoso.local${USERNAME}$
  • ${OFFICE} – The value (only the beginning until a space) defined in the current user’s Office field in Active directory
    Example:

    LOCPRINTER: ${OFFICE}
  • ${LOCATION} – The value (only the beginning until a space) defined in the current computer’s location field in Active directory
    Example:

    LOCPRINTER: ${LOCATION}

No variables can be overwritten. Every variable may contain another variable. For example, the group Laptops:

${THELOCATION}: ${OFFICE}

This example can be handy if you use it in combination with LOCPRINTER: ${THELOCATION}. All desktops if defined ${THELOCATION}: ${LOCATION} will connect to the printer located by the computer. But all laptops (computer objects that are member of the laptop group) connect to the printer in the office of the user.

If you want to use a command more than once, just use a , as delimiter between the values.
For Example:

PRINTER: HP4600,HP1200

Wildcard * is allowed in the parameters of the following commands:
MAPPING, NOMAPPING, PRINTER, LOCPRINTER, LPTPRINTER, STANDARDPRINTER, NOPRINTER

Fields that can contain YaLS user commands

Show where the field notes is for the group objectNotes field of the group object

Show where the field notes is for the user objectDescription field of the computer object

Show where the field description is for the computer objectDescription field of the computer object

Show where the field description is for the ouDescription field of the OU/Container

To enter more than one YaLS command in notes field, just use an enter. For description fields, use a ; as a delimiter. You are free to put spaces before and after any delimiter.
For example:

This is my description.; MAPPING: ShareOne, ShareFive ;LOCPRINTER : 16a

For a notes field this would have been:

This is my description.
MAPPING: ShareOne, ShareFive
LOCPRINTER : 16a

ACF loading animated gif