Novell Cool Solutions

ZCM – Import and Export of Policies and Bundles



By:

April 1, 2011 11:18 am

Reads:12,489

Comments:4

Score:Unrated

Print/PDF

As a Technical Sales Specialist for the ZENworks product line, I continuously test our beta software. In particular, ZENworks functionality on German desktops interests me. This includes various capabilities such as policies, applications, bundles, and images.

In the past I hadn’t taken the time to automate this process. During the beta of ZENworks 11 the time had come. I had a number of preconfigured applications in my old ZENworks 10 Configuration Management zone at that time. At the beginning of the test phase, there was no in-place upgrade of v10 to 11. After studying the manual I started in.

These are screenshots of my software environment:

Exporting Bundles

So that I didn’t have to constantly provide the Admin password, I began by storing the password in my admin session:

zman asc administrator

and exported the first application via zman:

zman betf “Software/Firefox 3.6 de” ff36de

Currently, there’s no GUI which can export all content, but there is copy and paste and the Notepad++ editor. Inside Notepad++ I copy and modify my commands. It’s really faster to use zman batch execute, to run multiple zman commands. So I’m deleting all zman commands and I get the following script:

#Export of Standard ZCM Applications
betf "Software/ZENworks Control Center" zcc
betf "Software/Desktop Depot" desktopDepot
betf "Software/Firefox 3.6 en" ff36en
betf "Software/Firefox 3.6 de" ff36de
betf "Software/Adobe Acrobat Reader 9 en" ar9en
betf "Software/Adobe Acrobat Reader 9 de" ar9de
betf "Software/Notepad" np++
betf "Software/WinSCP 4.2.9" WinSCP429
betf "Software/Change ZIcon" changeZicon
betf "Software/Device Manager" devmgmt

and save it as expzcm.txt

Now I can export all my applications:

zman bex expzcm.txt

Keep in mind, that the bundle export, does not export the application data itself. You need to have the original software files, that you upoaded within the bundle!

Importing Bundles

The import of applications is easy, but I would like to have my applications grouped and assigned to my workstations. So, workstation folders must first be created.

zman wfc MG
zman wfc DUS

and folders for my applications:

zman bfc SOFTWARE

Now I can start to import my applications (Firefox-3.6.13-en-US.msi exists in the same level, as my script):

zman bc “Firefox 3.6 de” ff36en.xml “SOFTWARE” -a ff36en_ActionContentInfo.xml

I used the Firefox.msi from Frontmotion. This is a single MSI file containing all necessary installation files. In this case the ff36de_ActionContentINfo.xml doesn’t need to be modified.

If an MSI installation needs multiple files to be uploaded, it should be placed in a folder. Therefore, you need to update the application path in the ActionContentInfo.xml file. In this example for Adobe Reader, I modified the file with the needed subdirectory folder:

Now, I am only missing the icon for the application that will be presented in the Novell Application Launcher. This gives a user the right look and feel. IcoFX is a freeware tool that extracts icons from applications. I file all icons in their own subdirectory. Downloading the same application with icon:

zman bc “Standard Desktop Software on Desktop” SOFTWARE -m “SOFTWARE/Desktop Depot”,”SOFTWARE/ZENworks Control Center” -i icons/NalView.ico

Now I provide a group and assign it applications:

zman bgc “Standard Desktop Software on Desktop” SOFTWARE -m “SOFTWARE/Desktop Depot”,”SOFTWARE/ZENworks Control Center”

I assign the group to a workstation container:

zman ba device “Software/Standard Desktop Software on Desktop” Workstations/MG

At the end you receive the following script:

# Create Folder
wfc MG 
wfc DUS
bfc SOFTWARE

# Create Applications and upload Software
bc "Adobe Acrobat Reader 9 de" ar9de.xml "SOFTWARE" -a ar9de_ActionContentInfo.xml -i icons/AcroRd32.ico
bc "Adobe Acrobat Reader 9 en" ar9en.xml "SOFTWARE" -a ar9en_ActionContentInfo.xml -i icons/AcroRd32.ico
bc "ZENworks Control Center" zcc.xml "SOFTWARE" -i icons/ZENUpdater.ico
bc "Desktop Depot" desktopDepot.xml "SOFTWARE" -i icons/NalView.ico
bc "Firefox 3.6 en" ff36en.xml "SOFTWARE" -a ff36en_ActionContentInfo.xml -i icons/firefox.ico
bc "Firefox 3.6 de" ff36de.xml "SOFTWARE" -a ff36de_ActionContentInfo.xml -i icons/firefox.ico
bc "WinSCP 4.2.9" WinSCP429.xml "SOFTWARE" -a WinSCP429_ActionContentInfo.xml -i icons/WinSCP.ico
bc "Notepad" np++.xml "SOFTWARE" -a np++_ActionContentInfo.xml -i icons/notepad++.ico
bc "Change ZIcon" changeZicon.xml "SOFTWARE" -a changeZicon_ActionContentInfo.xml
bc "Device Manager" devmgmt.xml "SOFTWARE" -i icons/devmgr.ico 

# Create Groups and assign Applications
bgc "Standard Desktop Software on Desktop" SOFTWARE -m "SOFTWARE/Desktop Depot,SOFTWARE/ZENworks Control Center"
bgc "Standard Desktop Software NAL" SOFTWARE -m "SOFTWARE/Change ZIcon,SOFTWARE/WinSCP 4.2.9,SOFTWARE/Notepad,SOFTWARE/Device Manager,SOFTWARE/Adobe Acrobat Reader 9 en,SOFTWARE/Adobe Acrobat Reader 9 de,SOFTWARE/Firefox 3.6 en,SOFTWARE/Firefox 3.6 de"

# Associations between Groups and Workstation Folders
ba device "Software/Standard Desktop Software on Desktop" Workstations/MG
ba device "Software/Standard Desktop Software NAL" Workstations/MG
ba device "Software/Standard Desktop Software on Desktop" Workstations/DUS
ba device "Software/Standard Desktop Software NAL" Workstations/DUS

Currently there is no zman option to configure the NAL shortcuts to be placed on the desktop. This assignment must be made manually. Edit the Assignment Details of each Workstation container and add the missing configuration.

Importing and Exporting Policies

The same approach I used for bundles applies to policies. Here’s an example for an export of a policy:

zman petf “Configuration Policies/DLU” dlu

Import of these Policies:

zman pc “DLU” dlu.xml “Configuration Policies”

The full policy import script (as batch) would be like that:

#Create DLU Policy, Power Mgmt, Browser Bookmarks, Policy Folder, Policy Group and Group Assignments
pfc "Configuration Policies"
pc "DLU" dlu.xml "Configuration Policies"
pc "DLU Admin" dluadmin.xml "Configuration Policies"
pc "Standard Bookmarks" bookmarks.xml "Configuration Policies"
pc "Power Management" pwmgmt.xml "Configuration Policies"
pgc "Standard Configuration" "Configuration Policies" -m "Configuration Policies/DLU,Configuration Policies/Standard Bookmarks,Configuration Policies/Power Management"


# Associations between Policies and Workstation Folders
pa device "Configuration Policies/Standard Configuration" Workstations/MG
pa device "Configuration Policies/Standard Configuration" Workstations/DUS

To check the import script, try it with my ZCM import batchfile impzcm.txt.

Just run

zman bex impzcm.txt

and all the bundles and policies will be imported into your ZCM zone.

I attached the content.zip, which includes all my exported applications and policies. I deleted the msi and exe files and replaced them with “dummy” files. Please copy the original application files to the same place. You can find the original files at the following websites:

Adobe Reader (you need to find the .exe file and extract it to a folder):
http://www.adobe.com

Firefox MSI Download Site
http://www.frontmotion.com/Firefox/download_firefox.htm

WinSCP Download Site
http://winscp.net/eng/download.php

Notepad++
http://notepad-plus-plus.org/download

ZENworks 10 Icons
/communities/media/zcm10-icons.zip

Replacing the ZENworks 11 Icons with the ZENworks 10.x Icons
https://www.novell.com/communities/node/12107/replacing-zenworks-11-icons-zenworks-10x-icons

Download IconFX
http://icofx.ro/

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...

Tags: ,
Categories: Technical, ZENworks Configuration Management

4

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

4 Comments

  1. By:whenz

    Hi Oliver

    Good work – thanks for sharing :-)

    kind regards
    Werner

  2. By:paulpf

    Thanks for the details in this Cool Solution… nice writeup.

  3. By:AndersG

    ie “Keep in mind, that the bundle export, does not export the application data itself”

    In 11.2 you can do zman betf -c, to export all bundle data as well as the files from the repository:

    bundle-export-to-file (betf) (bundle path) (XML file path) [version of the bundle][-c|–export-content]

    see the 11.2 docu for zman

  4. By:AndersG

    Use the -c option in zman betf to export files from the content-repo as well.

Comment

RSS