Novell is now a part of Micro Focus

Registering Workstations at same time as deployment of ZFDAgent.msi using ZENworks for Desktops Agent Distributor Utility and PsEXEC

Novell Cool Solutions: Feature
By Greg Nash

Digg This - Slashdot This

Posted: 6 Dec 2006

An ingenious method! Bear in mind that unless you put the name of the import server into the registry, or ensure that the workstation can resolve the DNS name ZENWSIMPORT, then moving or renaming the workstation in eDirectory will mean that the link between the workstation and its eDirectory object will be "broken", as it needs to contact the import service. My suggestion would be to use PSEXEC to import a registry file containing the importserver, and then run ZWSREG (or reboot the workstation and let Automatic Workstation Import take place).
Shaun Pond

While ZENworks 7 for Desktops provides a number of ways of importing workstations into eDirectory, many times they won't work in your specific environment. Messing with DNS or host files can be problematic or not possible for many networks.

Novell provides a good tool for remotely installing the ZFD Agent, however it does not allow for any method of including an import server along with the distribution.

Novell documents three ways to resolve the import server address (via DNS, Hosts file, or the registry) Editing the MSI file to include this information has not been successful, so I found this alternate method.


Install the ZFD Agent to a number of Win XP workstations and immediately import them into eDirectory. (Not tested with Win2k, or Vista, but should work fine)


  • ZFD 7 installed and running in your environment.
  • Windows XP workstations with a recent Novell Client installed (4.9.x only tested)
  • Administrative Share available and the Windows XP Firewall disabled.
  • List of IPs of workstations to install to.
  • Local administrator account on workstations to install to.
  • ConsoleOne with the ZFD snapins (to access the ZFD Agent Distributor Utility.
  • Psexec from PSTOOLS.

AND one of:

  • One or more Import Import Policies enable and configured
  • OR

  • Container(s) to which you wish to directly import a workstation (bypassing import policies).

Step 1: Deploy the agent

  1. Launch the ZENworks Distributor Utility via ConsoleOne (Tools/ZENworks Utilities/Install Agents)

  2. Browse to the location of your ZFDAgent.msi
    (Usually at \\YOURSERVER\ sys\PUBLIC\ZENworks\ZfdAgent\English
  3. Select Configure Agent and enable Install and then select the Features to suit your environment
    (Note: I have found that the reboot is not necessary.)

  4. Click OK and go back to the main screen.
  5. Click Add.
  6. Enter in the range of IP addresses and login credentials to use for installing the agent with.
  7. Click OK and then the Deploy Agent.
  8. Sit back and drink a cup of coffee.
  9. When complete, record any failed installations and resolve individually.
    Failures could be because of a variety of reasons (No administrative share enabled, firewall enabled, bad administrator password, msiexec being used by another process, etc.).

Step 2: Remotely Force Workstation Registration and Import using PSEXEC

  1. Create a text file with the list of IP addresses used in step 1.
    1 IP Address per line
    Save this file as with a name like deploy.txt into the same directory as a copy of PSEXEC.exe
  2. Launch a command window and change to the directory where your text file and PSEXEC are.

You can now force the workstation to be imported using PSEXEC to manually call zwsreg on each system.

Here are three scenarios on importing into your tree:

Scenario 1: Import into tree using default Workstation Import Policy.

Launch PSEXEC to execute zwsreg on each computer (specified in the text file) using your import server and default policy:

psexec @deploy.txt -u administrator -p <password> "c:\progra~1\novell\ZENworks\zwsreg.exe" -importserver <IMPORTSERVER IP>

Scenario 2: Import into tree using a specific Workstation Import Policy.

Same as Scenario 1, but we are going to add the TYPELESS DN of your import policy. Info on how to find out the typeless DN of your policy can be found here.

psexec @deploy.txt -u administrator -p <password> "c:\progra~1\novell\ZENworks\zwsreg.exe" -importserver <IMPORTSERVER IP> -importpolicy "<YOURPACKAGE>:General:Workstation Import.<OU>.<ORG>"

The quotes are necessary because of the space in the DN.

Notice that there are colons (:) between the package name, General and Workstation Import.

Scenario 3: Import into tree without an import policy.

You can also directly import into the tree without a policy, by specifying the full DN of the Workstation object to create. You do lose much of the power of import policies, but if your needs are simple this can also work.

You can use environment variables to build the name (%COMPUTERNAME% is an obvious one).

psexec @deploy.txt -u administrator -p <password> "c:\progra~1\novell\ZENworks\zwsreg.exe" -importserver <IMPORTSERVER IP> -importws <NAME>.CONTEXT

I hope this is helpful!

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates