ZCM Snippets

Add Workstation to Group

zman wga "/Devices/Workstations/GroupName" "/Devices/Workstations/Folder/computer-name"

Blank Site/Location

SELECT
  ZDEVICE.HOSTNAME,
  ZDEVICE.OSNAME,
  ZDEVICE.SITE,
  ZDEVICE.LOCATION,
  ZDEVICE.SERIALNUMBER
FROM
  ZCM_OWNER.ZDEVICE
WHERE
  ZDEVICE.SITE IS NULL
  OR
  ZDEVICE.LOCATION IS NULL

See all bundles and their associated users

SELECT
  BUNDLETBL.ZUID BUNDLEZUID,
  BUNDLETBL.NAME BUNDLENAME,
  BUNDLETBL.PATH BUNDLEPATH,
  BUNDLETBL.DESCRIPTION BUNDLEDESC,
  ZASSIGN.CONSUMERUID ASSIGNCUID,
  TARGETTBL.NAME TARGETNAME,
  TARGETTBL.PATH TARGETPATH
FROM
  ZCM_OWNER.ZZENOBJECT BUNDLETBL
  LEFT OUTER JOIN ZCM_OWNER.ZASSIGNMENT ZASSIGN
    ON BUNDLETBL.ZUID = ZASSIGN.CONTENTUID
  LEFT OUTER JOIN ZCM_OWNER.ZZENOBJECT TARGETTBL
    ON ZASSIGN.CONSUMERUID = TARGETTBL.ZUID
WHERE
  BUNDLETBL.PRIMARYTYPE = 'Bundle'
  AND
  TARGETTBL.NAME IS NOT NULL
  AND
  TARGETTBL.PATH LIKE '/System/References/%'

Broken ZCM11 Upgrades - ERRORED

SELECT
  ZCM_OWNER.ZDEVICE.HOSTNAME,
  ZCM_OWNER.ZZENOBJECT.NAME,
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.UPDATESTATUS,
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.STATUSMESSAGEKEY,
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.STATUSMESSAGEPARAMS,
  ZCM_OWNER.ZDEVICE.OSNAME
FROM
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO
  LEFT OUTER JOIN ZCM_OWNER.ZDEVICE
    ON ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.DEVICEUID = ZCM_OWNER.ZDEVICE.ZUID
  LEFT OUTER JOIN ZCM_OWNER.ZZENOBJECT
    ON ZCM_OWNER.ZZENOBJECT.ZUID = ZCM_OWNER.ZDEVICE.PRIMARYUSER
WHERE
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.UPDATESTATUS != 'FINISHED'
  AND
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.UPDATESTATUS != 'ASSIGNED'
  AND
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.UPDATESTATUS != 'AWAITING_REBOOT'
  AND
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.UPDATESTATUS != 'INSTALLING'

Broken ZCM11 Upgrades - ERRORED/INSTALLING/AWAITING REBOOT

SELECT
  ZCM_OWNER.ZDEVICE.HOSTNAME,
  ZCM_OWNER.ZZENOBJECT.NAME,
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.UPDATESTATUS,
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.STATUSMESSAGEKEY,
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.STATUSMESSAGEPARAMS,
  ZCM_OWNER.ZDEVICE.OSNAME
FROM
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO
  LEFT OUTER JOIN ZCM_OWNER.ZDEVICE
    ON ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.DEVICEUID = ZCM_OWNER.ZDEVICE.ZUID
  LEFT OUTER JOIN ZCM_OWNER.ZZENOBJECT
    ON ZCM_OWNER.ZZENOBJECT.ZUID = ZCM_OWNER.ZDEVICE.PRIMARYUSER
WHERE
  ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.UPDATESTATUS != 'FINISHED'
  AND ZCM_OWNER.ZSYSTEMUPDATEDEVICEINFO.UPDATESTATUS != 'ASSIGNED'
code_snippets/zcm_snippets.txt · Last modified: 2014/06/17 18:07 by smark
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0