zac for Macintosh (1)

Name

zac - The command line management interface for the Micro Focus ZENworks Agent that is installed and running on Macintosh managed devices.

Syntax

zac command options

Description

The zac utility performs command line management functions on the ZENworks managed device, including installing and removing software bundles, applying policies, and registering and unregistering the device.

Guide to Usage

This section contains a guide to general command formatting and conventions.

Most commands have a long form and a short form:

  • Long form: add-reg-key
  • Short form: ark

When both forms are available, the command is listed as follows:

add-reg-key (ark) options

When using the command, enter only the long form or the short form:

zac add-reg-key options

zac ark options

If an option includes a space, enclose it in quotation marks:

zac ark "option 1"

Mandatory and Optional arguments

Arguments enclosed inside parentheses ( ) are mandatory and those enclosed by square brackets [ ] are optional.

Ellipsis (...)

An ellipsis indicates that a command accepts multiple entries of the last argument type. The arguments must be separated by space or commas, depending on the command. For example:

zman server-add-bundle [options] (server) (bundle) [...]

The ellipsis indicates that server-add-bundle can accept multiple bundles. In the command level help, the multiple entry argument help is given as [(bundle) (bundle) ... (bundle)] for more clarity.

Bundle Commands

bundle-install (bin)

Installs the specified bundles based on the display name that match the specified regular expression or string, or the bundle GUID.

Use the bundle-list command to get a list of the available bundles and their display names.

An example to install a bundle:

zac bin MacBundle

bundle-launch (bln)

Launches the specified bundle. The actions in the Launch Action set are executed. If you try to launch a bundle that is not installed, the bundle is first installed and then launched.

Use the bundle-list command to get a list of the available bundles and their display names.

An example to launch a bundle based on the display name:

zac bln MacBundle

bundle-list (bl)

Displays the list of bundles assigned to the device and the logged-in user.

The output of this command is displayed in columns and provide the details of every bundle assigned or available for the managed device. The Display Name, Version, and Bundle Type columns represent the bundle display name, the version number of the bundle or sandbox if the bundle is a sandbox version, and the bundle type, respectively.

The Status column displays the following states:

Available: Displays this state if the bundle is installed.

Not Installed: Displays this state if the particular bundle version is not installed.

Downloaded: Displays this state if the contents are downloaded but the action in the Install Action set have not been executed.

An example to list all the bundles:

zac bl

bundle-lock-add (bla) [options] [bundlename] [...]

Locks the specified bundles that match the specified regular expression or string from being upgraded or removed.

Bundle locks are applicable only for Install action set.

Accepts the following options:

-li, --lock-install - Locks the bundle and prevents the installation of the bundle that is specified in the lock.

-t, --type - Specify the bundle type to be locked. The available types are MAC and Patch. If no type is specified, the type, bundle, is selected.

bundle-lock-list (bll)

Lists the bundle locks. The bundle locks are sorted by ID number.

An example to list the locked bundles:

zac bll

bundle-lock-remove (blr)

Removes the bundle lock that you specify by its number. You can find the number for each lock by using the bundle-lock-list command.

An example to remove all bundle locks:

zac blr --remove-all

bundle-props (bp)

Returns property information for a bundle.

An example to get the bundle properties of a specified bundle:

zac bp MacBundle

bundle-refresh (br)

Refreshes information about the specified bundle.

An example to refresh a bundle:

zac br MacBundle

bundle-search (bse)

Searches for bundles matching the specified java regular expression or string.

bundle-uninstall (bu)

Uninstalls the specified bundle. The actions that support the Undo action are executed while uninstalling the bundle. After the bundle uninstall is complete, the bundle state is displayed as Not Installed.

Use the bundle-list command to get a list of the installed bundles and their display names.

An example to uninstall a bundle:

zac bu MacBundle

bundle-verify (bv)

Reinstalls the bundle and executes the Verify action sets to ensure that no files have been removed or corrupted. Use the bundle-list command to get a list of the installed bundles and their display names.

An example to verify a bundle:

zac bv MacBundle

Core Commands

add-reg-key (ark)

This command registers a device by using the specified registration key.

Example: zac add-reg-key

agent-properties (agp)

This command provides information about the ZENworks Agent.

Example: zac agent-properties

cache-clear (cc)

Clears the cache on this device.

Example: zac cc

cert-info (ci)

Lists public key certificate information for each known ZCM server or adds a trusted root certificate to the machine store.

Example:

To list the certificate for each known ZENworks user:

zac ci

To add a trusted root certificate to the devices trusted store:

zac ci <location> -u myuser -p mypassword

config-location (cl)

Displays the current location.

Example:

zac config-location

file-system-guid (fsg)

Removes and restores the workstation GUID in the file system in preparation for taking an image.

Example:

To display the GUID value:

zac fsg

To remove the GUID and also conninfo.dat from the file system:

zac file-system-guid -d

To restore the GUID to the file system:

zac file-system-guid -r

Do not specify an option to print the the GUID value:

zac fsg

get-pref (get)

Displays the preferences that are currently set.

Example to display all preferences that have names beginning with abc:

zac get-pref abc

get-settings (gs)

Settings are downloaded by the Settings Module to the local cache on every refresh. This will return the effective settings associated with the given key.

Example:

zac gs key1

You can also use the get-settings (gs) command to list settings using various keys. For more information, see get-settings (gs) <key> in the Status Commands section.

logger [resetlog | level [MANAGED|ERROR|WARN|INFO|DEBUG] | managedlevel]

Changes the logger configuration.

You can use the following options:

  • resetlog - Resets the log.
  • level - If used without a level, displays the current managed logging level. If used with one of the levels, changes the logging level to the specified level.
  • managedlevel - Displays the Global Log level of the zone.

Example to reset the log file:

zac logger resetlog

Example to show the current log level:

zac logger level

Example to set the log level to DEBUG and above:

zac logger level DEBUG

reestablish-trust (retr)

This command re-establishes trust with the current zone.

Reestablishes trust with the current Management Zone. The username and password used must be of the Zone Administrator.

Example:

zac retr -u myuser -p mypassword

The -u and -p parameters are optional. If you don’t use the -u and -p parameters, you are prompted to enter a username and password.

refresh (ref)[general | partial bundle <Bundle Display Name> [bypasscache]

Initiates a general refresh to refresh all bundles, policies, registration, and configuration settings; initiates a partial refresh to refresh all policies, registration, and configuration settings.

Use bypasscache to avoid using data from the server cache during the refresh. This option is useful for testing or troubleshooting.

Examples:

zac ref general bypasscache

zac ref partial bypasscache

register (reg) [-g] [-r] [-a <authorization key>] [-k <key>] [-u <username> -p <password] <ZENworks Server address:port>

Registers the device in a Management Zone.

To execute this command you must have Create/Delete device rights for the folder that you are attempting to register.

You can use the following options:

  • g - Lets you create a new device object with a new GUID and password for the device if you have multiple devices with the same GUID. When you register a device by using this switch, all the associations (policies and bundles) assigned to the original device object are removed. You cannot use this option to create a new GUID for a Primary Server or a Satellite device. The local user must have Local Administrator rights to use this option.
  • k - Lets you register the device using the specified registration key.
  • p - Lets you specify the Management Zone administrator’s password.
  • u - Lets you specify the Management Zone administrator’s username.
  • a - Lets you specify the authorization key to authorize the device.
  • r - Lets you to reset the device password and then register the device.
  • a - Lets you specify the authorization key to authorize the device.
  • The Authorization key is stored locally in the ZENworks agent. The key can be added/updated in the agent using this option.
  • This option cannot be used along with the other options.

Examples:

zac reg -k key1 https://123.456.78.90

zac reg -k key1 -u administrator -p novell https://zenserver.novell.com:8080

The port number is required only if the ZENworks Server is not using the standard HTTP port. If a username and password are not supplied, you are prompted for them.

NOTE:

  • The -g and -k options will not be honored if the corresponding device object is already present on the server and reconciliation takes place with that device object.

  • When you modify or update the GUID using the -g option, then audit and messages generated with the old GUID will be lost.

reregister (rereg)

This command registers a device in the current zone and assigns it to the GUID of an existing device object. The currently associated device object is deleted. To execute this command you must have Create/Delete device rights for the folder on which you are attempting to reregister.

To reregister, specify a username and password:

zac reregister -u myuser -p mypassword eaa6a76814d650439c648d597280d5d4

set-pref (set)

Sets the value for a preference.

Example to set the value of preference abc to 123:

zac set-pref abc 123

set-proxy (sp) [options] <IP address/Hostname:port>

Specifies a proxy to contact rather than contacting a ZENworks Server directly.

The options are:

  • --default - Sets a proxy that can be overriden by proxy settings from the Management Zone.
  • --clear - Clears the current proxy, but will use proxy settings from the Management Zone.
  • --ipv6 - sets an IPv6 proxy.

Examples:

IPv4:

zac sp 123.456.78.90:2349 administrator novell

zac sp /default 123.456.78.90:2349

zac sp /clear

IPv6:

zac sp /ipv6 [2001:db8:0:1:1:1:1:1]:2349 administrator novell

If a username and password is not specified, then you will be prompted to enter them.

unregister (unr)

This command unregisters a device from the current zone.

To execute this command you must have Create/Delete device rights for the folder on which you are attempting to unregister

Example:

zac unr -u administrator -p novell

NOTE:Running UNR command might cause high utilization of the database. This might be due to any of the following reasons:

  • The UNR command is running on the server.

  • The zone contains large number of managed devices.

  • The managed devices have a huge history.

  • The Patch Management is enabled.

zone-config (zc)

This command displays the Zone Configuration server or lists the current zone configuration.

zac zc

Inventory Commands

inventory (inv) [scannow]

Runs an inventory scan.

An example to run an inventory scan:

zac inv scannow

Inventory-Only Commands

These commands are used only for Inventory-Only Agents (IOA).

zac ioa cfg <server ip>

Configures the MAC Inventory-Only Agent (IOA) device to the mentioned server ip.

An example to register a MAC Inventory-Only device to the server <10.70.13.124>

zac ioa cfg 10.70.13.124

zac ioa version

Displays the version of the Inventory-Only Agent (IOA).

inventory (inv) [scannow]

Runs an inventory scan.

An example to run an inventory scan:

zac inv scannow

Patch Management Commands

patch-scan (ps)

Scans the device for patches that are not applied, using the device's current patch signature (DAU) file. The results are then uploaded to the server.

An example to run a patch scan:

zac ps

patch-scan --quick (ps --quick)

Uploads the last scan results to the server; it does not run a new detection scan.

An example to run a quick patch scan:

zac ps --quick

patch-scan --complete (ps --complete)

Scans the device for patches that are not applied, using an updated patch signature (DAU) file. The results are then uploaded to the server.

An example to run a complete patch scan:

zac ps --complete

patch-apply-policy (pap)

Updates devices with the latest version of all patch policies.

An example to run a patch apply policy:

zac pap

patch-quarantine-release (pqr)

Releases any quarantined patches on the device where the command is run from quarantine so that a one-time installation attempt can occur, either from a patch policy schedule or a remediation schedule.

An example to run a patch quarantine release:

zac pqr

patch-distribute-policy, pdp

Distribute all patch policies to the device. This will attempt to distribute all patches that do not match the policy.

patch-download, pd

Downloads the content associated with the specified patch names.

Syntax: zac patch-download (pd) [options]

The following are the available options:

--patch: Name of the patches that should be installed. If you want to install multiple patches, then specify the name of the patches separated by a comma.

Example: zac pd --patch patch_name1, name2, name3

patch-download-catalog, pdc

Downloads the catalog used for scanning the patches.

Syntax: zac patch-download-catalog (pdc)

patch-export-catalog, pec

Exports the patch details in the catalog to the PatchMetadata.csv file.

Syntax: zac patch-export-catalog (pec)

patch-install, pi

Installs the downloaded patches.

Syntax: zac patch-install (pi) [options]

The following are the available options:

--patch: Name of the patch that should be installed.

Example 1: zac pi --patch name

patch-list, plp

Lists all the required patches.

Syntax: zac patch-list (plp) [options]

The following are the available options:

--all: List all the patches, including the installed patches.

policy-list, pl

This command returns a list of the policies that are currently enforced on the device. By default, this displays the effective (non-filtered) policies.

zac pl –all

Displays both filtered and non-filtered policies.

System Update Commands

zac zeus-refresh / zeus-ref

Retrieves the system update when it is assigned to a device.

NOTE:This command is not applicable on Satellite Servers.

ZENworks Certificate Commands

zac certificate-verify / cv

Verifies if the server certificate and key file copied to the remint repository are valid and updates the results to the server.