Jamie Glendinning ENGL Imaging Toolkit™ 6 Advanced ZENworks imaging integration and scripting.

Slides:



Advertisements
Similar presentations
Visit the ccScan Website Scan, Import, and Automatically File documents to the Cloud SCAN, IMPORT, AND AUTOMATICALLY FILE DOCUMENTS TO SALESFORCE ® Introduction.
Advertisements

Jamie Glendinning ENGL Imaging Toolkit 6 Windows XP unattended install using bootable USB.
Jamie Glendinning ENGL Imaging Toolkit 6 Managing your drivers using Build Console.
Module 12: Auditing SQL Server Environments
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Lesson 17: Configuring Security Policies
Jamie Glendinning ENGL Imaging Toolkit™ 6 Disconnected imaging using CDROM and USB.
Unauthorized Reproduction Prohibited SkyPoint Alarm Integration Add-On Using OnGuard Alarms to create events in SkyPoint Also called ‘SkyPoint V0’ CR4400.
1 Distributed File System, and Disk Quotas (Week 7, Thursday 2/21/2007) © Abdou Illia, Spring 2007.
14.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 12: Managing and Implementing Backups and Disaster Recovery.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
Module 6 Windows 2000 Professional 6.1 Installation 6.2 Administration/User Interface 6.3 User Accounts 6.4 Managing the File System 6.5 Services.
Hands-On Microsoft Windows Server 2003 Administration Chapter 6 Managing Printers, Publishing, Auditing, and Desk Resources.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
Using the Windows Event Viewer and Task Scheduler Chapter 5.
VMware vCenter Server Module 4.
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
Configuring Task Scheduler Lesson 9. Skills Matrix Technology SkillObjective Domain SkillDomain # Understanding Task Scheduler Configure and manage the.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 14: Problem Recovery.
Windows Tutorial 9 Maintaining Hardware and Software
VMWare Workstation Installation. Starting Vmware Workstation Go to the start menu and start the VMware Workstation program. *Note: The following instructions.
Ch 8-3 Working with domains and Active Directory.
Purpose Intended Audience and Presenter Contents Proposed Presentation Length Intended audience is all distributor partners and VARs Content may be customized.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
®® Microsoft Windows 7 for Power Users Tutorial 8 Troubleshooting Windows 7.
Hands-On Microsoft Windows Server 2008
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Two Deploying Windows Servers.

© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 1 Third Edition Chapter 6 Today’s Windows Windows Vista and Windows 7 McGraw-Hill.
Module 4: Add Client Computers and Devices to the Network.
Ch 8. The Control Panel Window –Category View The Control Panel Window –Small icons View.
Hands-On Virtual Computing
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
Copyright ®xSpring Pte Ltd, All rights reserved Versions DateVersionDescriptionAuthor May First version. Modified from Enterprise edition.NBL.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 7: Domain Name System.
Week #7 Objectives: Secure Windows 7 Desktop
5.1 © 2004 Pearson Education, Inc. Lesson 5: Administering User Accounts Exam Microsoft® Windows® 2000 Directory Services Infrastructure Goals 
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 1 Third Edition Chapter 5 Windows XP Professional McGraw-Hill.
Copyright 2000 eMation SECURITY - Controlling Data Access with
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Troubleshooting Windows Vista Security Chapter 4.
SUSE Linux Enterprise Desktop Administration Chapter 12 Administer Printing.
Step By Step Windows Server 2003 Installation Guide Step By Step Windows Server 2003 Installation Guide.
DIT314 ~ Client Operating System & Administration CHAPTER 5 MANAGING USER ACCOUNTS AND GROUPS Prepared By : Suraya Alias.
Activating Clarity  Activating Clarity  Activation  Online Activation  Fax Activation  Review and Verify Activation and License Terms  Updating.
Microsoft Solution Accelerator for Business Desktop Deployment Microsoft ® Solution Accelerator for Business Desktop Deployment Training for IT Professionals.
LDAP Authentication Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
1 Part-1 Chap 5 Configuring Accounts Definitions.
Module 4: Managing Recipients. Overview Introduction to Exchange Recipients Creating, Deleting, and Modifying Users and Contacts Managing Mailboxes Managing.
3 Copyright © 2004, Oracle. All rights reserved. Controlling Access to the Oracle Listener.
VMWare Workstation Installation. Starting Vmware Workstation Go to the start menu and start the VMware Workstation program. *Note: The following instructions.
Using LastPass. Great password management is impossible w/o a great tool Auto-fill (hands-free login) will save you approximately one hour per month You.
Working with Disks Lesson 4. Skills Matrix Technology SkillObjective DomainObjective # Configuring Data Protection Configure data protection6.4 Using.
The world leader in serving science Overview of Thermo 21 CFR Part 11 tools Overview of software used by multiple business units within the Spectroscopy.
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter Three Managing Recipients.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 1 Third Edition Chapter 6 Today’s Windows Windows Vista and Windows 7 McGraw-Hill.
VMWare Workstation Installation. Starting Vmware Workstation Go to the start menu and start the VMware Workstation program. *Note: The following instructions.
Virtual Machines Module 2. Objectives Define virtual machine Define common terminology Identify advantages and disadvantages Determine what software is.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Vmware 2V0-621D Vmware Exam Questions & Answers VMware Certified Professional 6 Presents
1 Remote Installation Service Windows 2003 Server Prof. Abdul Hameed.
Chapter Objectives In this chapter, you will learn:
Project Management: Messages
Lesson 6: Configuring Servers for Remote Management
INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT
Presentation transcript:

Jamie Glendinning ENGL Imaging Toolkit™ 6 Advanced ZENworks imaging integration and scripting

Copyright © Expert Networking Group Limited 2 Agenda Introduction Zim Scenarios Capture img error codes to zim.log file Changing image restore locations Password protect dynamic Zim restore menu Dynamic development menu How to use VMware snapshots with Zim Selecting owner of machine from AD using search filters

Copyright © Expert Networking Group Limited 3 Introduction

Copyright © Expert Networking Group Limited 4 Introduction Level  Intermediate Duration  30 minutes Assumptions  An understanding of the ENGL build process

Copyright © Expert Networking Group Limited 5 Zim

Copyright © Expert Networking Group Limited 6 Zim What is Zim?  Zim is a front end to the ZENworks imaging environment  Zim is designed to simplify, secure and automate ZENworks imaging tasks.  Using Zim, imaging tasks can be delivered based on user credentials from the corporate LDAP directory.  These tasks can automate complex naming, partition and imaging tasks whilst the user is presented with a simple set of menu options.

Copyright © Expert Networking Group Limited 7 Zim zim.cfg The zim.cfg file that is created by the Imaging Toolkit 6 Build Console / Integration Wizard and will cover most basic customer requirements: Multiple projects Different OS’s Same OS – different build configurations Computer naming prompt Restore appropriate image files Restore appropriate driver image based on OS and Hardware filters

Copyright © Expert Networking Group Limited 8 Zim zim.cfg The zim.cfg file is a script file. It can be customised to meet the requirements of individual customers. The functions used to develop and extend the zim.cfg file can be found on the ENGL website:

Copyright © Expert Networking Group Limited 9 Scenario Capture img error codes to zim.log file

Copyright © Expert Networking Group Limited 10 Scenario Capture img error codes to zim.log file Zim will record img error codes to the zim.log file (if it is configured) however an error code does not always help if it is unclear what the error code number means. With ZCM 10.3.x and newer it is possible to review the imglogr file in the imaging environment to identify what img believes the issue is. Each time img is launched the imglogr file gets overwritten.

Copyright © Expert Networking Group Limited 11 Scenario Capture img error codes to zim.log file To record this information configure Zim to append to the zim.log file. To do this update the zim.cfg file with the following: File:Run,"cat imglogr >> /zimbin/zim.log",verbose after each img command you want to capture the error information on.

Copyright © Expert Networking Group Limited 12 Scenario Capture img error codes to zim.log file Dialog:Popup,"Restoring ENGL Smart Windows build process, please wait...",green Pause:3 File:Run,"img %imgrestorecmd%project_image_path%/%base_image%",verbose File:Run,"cat imglogr >> /zimbin/zim.log",verbose File:Run,"img %imgrestorecmd%project_image_path%/hotfixes.zmg",verbose File:Run,"cat imglogr >> /zimbin/zim.log",verbose If:Var,machine_type,eq,"tablet" File:Run,"img %imgrestorecmd%project_image_path%/tablet.zmg",verbose File:Run,"cat imglogr >> /zimbin/zim.log",verbose End: File:Run,"img %imgrestorecmd%project_image_path%/%project_novcomp%",verbose File:Run,"cat imglogr >> /zimbin/zim.log",verbose File:Run,"img %imgrestorecmd%project_image_path%/%project_ztoolkit%",verbose File:Run,"cat imglogr >> /zimbin/zim.log",verbose File:Run,"img %imgrestorecmd%project_image_path%/%drivers_image%",verbose File:Run,"cat imglogr >> /zimbin/zim.log",verbose Pause:2 Dialog:Popupclose Update the zim.cfg file so the new command is after each img command you want to capture the error information on.

Copyright © Expert Networking Group Limited 13 Scenario Capture img error codes to zim.log file [15-Apr-11 12:43:32] [Zim] [Debug] > SET [_error] to [0] [15-Apr-11 12:43:32] [Zim] [Debug] [File:Run,"img %imgrestorecmd%project_image_path%/%project_ztoolkit%","verbose"] [15-Apr-11 12:43:32] [Zim] [Debug] +[File:Run,"img -r -p 5173-xpsp3/ztoolkit.zmg","verbose"] [15-Apr-11 12:43:40] [Zim] [Debug] nCode = 1 [15-Apr-11 12:43:40] [Zim] [Debug] > SET [_error] to [1] [15-Apr-11 12:43:40] [Zim] [Debug] [File:Run,"cat imglogr >> /zimbin/zim.log","verbose"] Novell ZENworks Imaging Engine v (c) Copyright , Novell, Inc. All rights reserved. Image restored: 5173-xpsp3/ztoolkit.zmg from Elapsed time: 00:06 New image successful [15-Apr-11 12:43:40] [Zim] [Debug] nCode = 0 Sample zim.log file

Copyright © Expert Networking Group Limited 14 Scenario Changing image restore locations

Copyright © Expert Networking Group Limited 15 Scenario Changing image restore locations When restoring projects all image files are expected to be found in the../content-repo/images/ folder structure. This is very easy to manage however if there is more than one project with the same OS there can be a lot of duplicated files within the project structures.

Copyright © Expert Networking Group Limited 16 Scenario Changing image restore locations It is possible to modify the image restore folder structure so OS specific files are separate from project files and update Zim so that it knows where to restore files from.

Copyright © Expert Networking Group Limited 17 Scenario Changing image restore locations Dialog:Popup,"Restoring ENGL Smart Windows build process, please wait...",green Pause:3 File:Run,"img %imgrestorecmd%project_image_path%/%base_image%",verbose File:Run,"img %imgrestorecmd%project_image_path%/hotfixes.zmg",verbose If:Var,machine_type,eq,"tablet" File:Run,"img %imgrestorecmd%project_image_path%/tablet.zmg",verbose End: File:Run,"img %imgrestorecmd%project_image_path%/%project_novcomp%",verbose File:Run,"img %imgrestorecmd%project_image_path%/%project_ztoolkit%",verbose File:Run,"img %imgrestorecmd%project_image_path%/%drivers_image%",verbose Pause:2 Dialog:Popupclose Update the zim.cfg file to change the restore paths for the base image and drivers image Dialog:Popup,"Restoring ENGL Smart Windows build process, please wait...",green Pause:3 File:Run,"img %imgrestorecmd%os/%project_os%/%base_image%",verbose File:Run,"img %imgrestorecmd%project_image_path%/hotfixes.zmg",verbose If:Var,machine_type,eq,"tablet" File:Run,"img %imgrestorecmd%project_image_path%/tablet.zmg",verbose End: File:Run,"img %imgrestorecmd%project_image_path%/%project_novcomp%",verbose File:Run,"img %imgrestorecmd%project_image_path%/%project_ztoolkit%",verbose File:Run,"img %imgrestorecmd%os/%project_os%/%drivers_image%",verbose Pause:2 Dialog:Popupclose

Copyright © Expert Networking Group Limited 18 Scenario Changing image restore locations Move the base image files, driver images and HAL image files into the appropriate OS/ folders

Copyright © Expert Networking Group Limited 19 Scenario Password protect dynamic Zim restore menu

Copyright © Expert Networking Group Limited 20 Scenario Password protect dynamic Zim restore menu When configuring a standard menu item within Zim it is possible to specify a simple password to protect this menu item. It is not possible to specify a simple password with the dynamic menu items that are created based on the projects.ini file. It is possible to modify the zim.cfg file to prompt for the appropriate password once the dynamic menu item has been selected. The password is stored in an additional field in the projects.ini file

Copyright © Expert Networking Group Limited 21 Scenario Password protect dynamic Zim restore menu Update the zim.cfg file with the following information: Set:lookup_project,%_project_item2 Label:lookup_project_info ; Validate password if set in projects.ini file Set:pw_login_count,"0" Set:pw_login_count_max,"2" File:Ini,Get,"/zimbin/projects.ini","%lookup_project%","project_password",project_password label:validate_password If:var,project_password,ne,"" ; password has been set ; Display password prompt Dialog:InputPass,"Enter password:",prompt_password,RED if:var,prompt_password,ne,"%project_password%" Set:pw_login_count,math(+, 1) If:Var,pw_login_count,gt,"%pw_LOGIN_COUNT_MAX%" Dialog:Ask,"Menu Lockout!","You have failed to authenticate 3 times.\n \nPress a key to return to the main menu.","_Ok","red" menu:return End: goto:validate_password End: ; Read in project specific information File:Ini,Get,"/zimbin/projects.ini","%lookup_project%","project_image_path",project_image_path File:Ini,Get,"/zimbin/projects.ini","%lookup_project%","project_os",project_os File:Ini,Get,"/zimbin/projects.ini","%lookup_project%","base_image",base_image File:Ini,Get,"/zimbin/projects.ini","%lookup_project%","ztoolkit",project_ztoolkit File:Ini,Get,"/zimbin/projects.ini","%lookup_project%","novcomp",project_novcomp

Copyright © Expert Networking Group Limited 22 Scenario Password protect dynamic Zim restore menu Update the projects.ini file with the following “project_password = value”: ; ; ENGL Zim projects.ini lookup file ; [projects] project1 = Techbite drivers demo - Win 7 project2 = Windows 7 Enterprise (x86) - en-US project3 = xpsp3-test ; Project details [Techbite drivers demo - Win 7] Description = Techbite drivers demo - Win 7 project_image_path = techbite-drivers-win7 project_os = win7-ent-x86 base_image = win7-ent-x86-postsp ztoolkit = ztoolkit.zmg novcomp = project_password = [Windows 7 Enterprise (x86) - en-US] Description = Windows 7 Enterprise (x86) - en-US project_image_path = win7-demo project_os = win7-ent-x86 base_image = win7-ent-x86-postsp ztoolkit = ztoolkit.zmg novcomp = novcomp.zmg project_password = [xpsp3-test] Description = xpsp3-test project_image_path = xpsp3-test project_os = winxp-x86 base_image = winxp-x86-postsp ztoolkit = ztoolkit.zmg novcomp = novcomp.zmg project_password =

Copyright © Expert Networking Group Limited 23 Scenario Password protect dynamic Zim restore menu Note: The project_password attribute needs to be set on each project section. Zim will error if it is not available. The password does not need to be populated on each entry.

Copyright © Expert Networking Group Limited 24 Scenario Password protect dynamic Zim restore menu ProjectPassword Techbite drivers demo - Win Windows 7 Enterprise (x86) - xpsp3-test

Copyright © Expert Networking Group Limited 25 Demo Password protect dynamic Zim restore menu

Copyright © Expert Networking Group Limited 26 Scenario Password protect dynamic Zim restore menu

Copyright © Expert Networking Group Limited 27 Scenario Dynamic development menu

Copyright © Expert Networking Group Limited 28 Scenario Dynamic development menu Zim uses the projects.ini file to populate a dynamic restore menu When testing a project it is not always appropriate for the project to be available in this restore menu It is possible to modify the projects.ini file and the Development menu configuration in the zim.cfg file to separate test and live project restore options

Copyright © Expert Networking Group Limited 29 Scenario Dynamic development menu Update the projects.ini file with the following information: ; ; ENGL Zim projects.ini lookup file ; [projects] project1 = Techbite drivers demo - Win 7 project2 = Windows 7 Enterprise (x86) - en-US project3 = xpsp3-test ; Project details [Techbite drivers demo - Win 7] Description = Techbite drivers demo - Win 7 project_image_path = techbite-drivers-win7 project_os = win7-ent-x86 base_image = win7-ent-x86-postsp ztoolkit = ztoolkit.zmg novcomp = [Windows 7 Enterprise (x86) - en-US] Description = Windows 7 Enterprise (x86) - en-US project_image_path = win7-demo project_os = win7-ent-x86 base_image = win7-ent-x86-postsp ztoolkit = ztoolkit.zmg novcomp = novcomp.zmg [xpsp3-test] Description = xpsp3-test project_image_path = xpsp3-test1 project_os = winxp-x86 base_image = winxp-x86-postsp ztoolkit = ztoolkit.zmg novcomp = novcomp.zmg ; ; ENGL Zim projects.ini lookup file ; [projects] project1 = Techbite drivers demo - Win 7 project2 = Windows 7 Enterprise (x86) - en-US [Development] project1 = xpsp3-test ; Project details [Techbite drivers demo - Win 7] Description = Techbite drivers demo - Win 7 project_image_path = techbite-drivers-win7 project_os = win7-ent-x86 base_image = win7-ent-x86-postsp ztoolkit = ztoolkit.zmg novcomp = [Windows 7 Enterprise (x86) - en-US] Description = Windows 7 Enterprise (x86) - en-US project_image_path = win7-demo project_os = win7-ent-x86 base_image = win7-ent-x86-postsp ztoolkit = ztoolkit.zmg novcomp = novcomp.zmg [xpsp3-test] Description = xpsp3-test project_image_path = xpsp3-test1 project_os = winxp-x86 base_image = winxp-x86-postsp ztoolkit = ztoolkit.zmg novcomp = novcomp.zmg

Copyright © Expert Networking Group Limited 30 Scenario Dynamic development menu Update the zim.cfg file with the following information: ; Development Menu Menu:Start,mnu_dev,"Development Menu","Red" Menu:Item,dev_make_image,"Make an image" Menu:Item,dev_restore_image,"Restore an image" Menu:Separator Menu:Item,_previous,"Return to Maintenance Menu" Menu:Item,_top,"Return to Main Menu" ; Development Menu Menu:Start,mnu_dev,"Development Menu","Red" ; Enable variable expansion in menu, item title and item params and before adding menu item Set:_MenuExpandTitleVariables,"true" Set:_MenuExpandItemParamsVariables,"true" ; Get first project section name Set:devIndex,1 Set:devKey,“project%devIndex%“ File:Ini,Get,"projects.ini","Development","%devKey%",devSection While:Var,devSection,ne,"“ ; Get project details File:Ini,Get,"projects.ini","%devSection%","Description",devDescription ; Add menu item Menu:Item,restore_ztoolkit_begin,"%devDescription%","","%devDescription%“ ; Next project section Set:devIndex,Math("+", 1) Set:devKey,"dev%devIndex%“ File:Ini,Get,"projects.ini","Development","%devKey%",devSection Wend: ; Disable variable expansion in menu, item title and item params and after adding menu item Set:_MenuExpandTitleVariables,"false" Set:_MenuExpandItemParamsVariables,"false“ Menu:Separator Menu:Item,dev_make_image,"Make an image" Menu:Item,dev_restore_image,"Restore an image" Menu:Separator Menu:Item,_previous,"Return to Maintenance Menu" Menu:Item,_top,"Return to Main Menu"

Copyright © Expert Networking Group Limited 31 Demo Standard development menu

Copyright © Expert Networking Group Limited 32 Scenario Dynamic development menu

Copyright © Expert Networking Group Limited 33 Demo Dynamic development menu

Copyright © Expert Networking Group Limited 34 Scenario Dynamic development menu

Copyright © Expert Networking Group Limited 35 Scenario How to use VMware snapshots with Zim

Copyright © Expert Networking Group Limited 36 Scenario How to use VMware snapshots with Zim When testing in a VMware environment it is more efficient to revert to a snapshot of a base image than restore the entire image from the ZENworks imaging server. Zim can be configured to bypass restoration of the base image if the client machine is running within a virtual machine.

Copyright © Expert Networking Group Limited 37 Scenario How to use VMware snapshots with Zim To configure the virtual machine PXE boot to Zim menu Select Maintenance Menu Select Development Menu Select Restore an image Select from list Enter base image name and restore it Shut down machine Make a VMware snapshot of machine

Copyright © Expert Networking Group Limited 38 Scenario How to use VMware snapshots with Zim Update the zim.cfg file with the following information: Form:Display,"Info" If:Var,_Form,Eq,"_Cancel" Menu:Return End: Set:Ask_COMPUTERNAME,%_Info_item7% Set:AutoRestart,%_Info_item9% If:Var,Ask_COMPUTERNAME,ne,"%COMPUTERNAME%" Set:COMPUTERNAME,"%Ask_COMPUTERNAME%" End: Dialog:Ask,"", "Warning! All hard disk data on this machine will be erased.\n \nContinue?","_YesNo",red If:Var,_ask,eq,"_No" Menu:Return End: Dialog:Popup,"Restoring ENGL Smart Windows build process, please wait...",green Pause:3 File:Run,"img %imgrestorecmd%project_image_path%/%base_image%",verbose File:Run,"img %imgrestorecmd%project_image_path%/hotfixes.zmg",verbose Form:Display,"Info" If:Var,_Form,Eq,"_Cancel" Menu:Return End: Set:Ask_COMPUTERNAME,%_Info_item7% Set:AutoRestart,%_Info_item9% If:Var,Ask_COMPUTERNAME,ne,"%COMPUTERNAME%" Set:COMPUTERNAME,"%Ask_COMPUTERNAME%" End: ; If machine is a VMWare machine - prompt for base image to restore (allows for snapshot workaround) If:Var,lookup_section,contains,"vmw" ; Launch a Form to display detected hardware and select machine type Form:Start,"vmware","Select Base image to use","_OkCancel^Ok” Form:Item,"Item1",StaticText,"VMWare Machine detected" Form:Item,"Item2",Label,"Select Base Image type :" Form:Item,"Item3",RadioButtons,"","Restore Image, Snapshot" Form:Display,"vmware" If:Var,_Form,Eq,"_Cancel" Menu:Return End: If:var,_vmware_item3,eq,"Snapshot" set:base_image,"" End: Dialog:Ask,"", "Warning! All hard disk data on this machine will be erased.\n \nContinue?","_YesNo",red If:Var,_ask,eq,"_No" Menu:Return End: Dialog:Popup,"Restoring ENGL Smart Windows build process, please wait...",green Pause:3 File:Run,"img %imgrestorecmd%project_image_path%/%base_image%",verbose File:Run,"img %imgrestorecmd%project_image_path%/hotfixes.zmg",verbose

Copyright © Expert Networking Group Limited 39 Demo How to use VMware snapshots with Zim

Copyright © Expert Networking Group Limited 40 Scenario How to use VMware snapshots with Zim

Copyright © Expert Networking Group Limited 41 Scenario How to use VMware snapshots with Zim

Copyright © Expert Networking Group Limited 42 Scenario Selecting owner of machine from AD using search filters

Copyright © Expert Networking Group Limited 43 Scenario Selecting owner of machine from AD using search filters It is sometimes useful to identify the owner of a machine at imaging in order to fully customise the machine for that user account. The easiest way to do this is to configure an LDAP query in a Zim form. This will present the user with a list of user accounts, one of which can be selected and the appropriate information stored to ZISD

Copyright © Expert Networking Group Limited 44 Scenario Selecting owner of machine from AD using search filters Modify the standard zim.cfg file ; Authenticate to LDAP server LDAP:Init,"labsrv.engllab.local",389 If:Var,_error,eq,1 Dialog:Ask,"LDAP Bind Error","%_ldaperrorstr%","_any",RED LDAP:Unbind Goto:TheEnd End: ; Launch a Form to display detected hardware and select machine type Form:Start,"Info","Hardware Detected","_OkCancel^_Ok",Blue Form:Item,"Item1",StaticText,"-Manufacturer : %lookup_section%" Form:Item,"Item2",StaticText,"-Model : %lookup_value%" Form:Item,"Item3",StaticText,"-Hardware Image : %drivers_image%" Form:Item,"Item4",StaticText,"-Hardware Type : %machine_type%" Form:Item,"Item5",StaticText,"-OS : %project_os%" Form:Item,"Item6",Label,"Computer Name :" Form:Item,"Item7",EditBox,"%COMPUTERNAME%" Form:Item,"Item8",Label,"Select Owner :" Form:Item,"item9",ListBox_LDAP,"","OU=users,OU=itz6,DC=engllab,DC=local",ONELEVEL,"(objectclass=Person)","cn" Form:Item,"Item10",Label,"Auto Restart after imaging:" Form:Item,"Item11",Radiobuttons,"Yes","Yes,No" Form:Display,"Info" If:Var,_Form,Eq,"_Cancel" Menu:Return End: Set:Ask_COMPUTERNAME,%_Info_item7% Set:ask_owner,%_Info_item9% Set:AutoRestart,%_Info_item11% If:Var,Ask_COMPUTERNAME,ne,"%COMPUTERNAME%" Set:COMPUTERNAME,"%Ask_COMPUTERNAME%" End:

Copyright © Expert Networking Group Limited 45 Scenario Selecting owner of machine from AD using search filters ; Update the information in ZISD Zisd:Put,NetBiosName,%COMPUTERNAME% ; Update VendorDataENGL Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Machine_Type","%machine_type%") Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","OS","%project_os%") Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Project","%lookup_project%") Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Owner","%ask_owner%") ZISD:Put,VendorDataENGL,"%VendorDataENGLSTRING%" Zisd:Write

Copyright © Expert Networking Group Limited 46 Scenario Selecting owner of machine from AD using search filters

Copyright © Expert Networking Group Limited 47 Scenario Selecting owner of machine from AD using search filters This method is very useful as a starting point to querying AD but has some limitations:  AD by default limits LDAP queries to 1000 results  Need to scroll through each item to find the appropriate username It is possible to extend the form to prompt for an attribute of the user account then use this attribute to filter the list of users:  First name  Surname

Copyright © Expert Networking Group Limited 48 Scenario Selecting owner of machine from AD using search filters By filtering the query on an attribute the number of results is normally well within the 1000 record limit for AD LDAP queries and will result in a much shorter list to scroll through to select the appropriate user.

Copyright © Expert Networking Group Limited 49 Scenario Selecting owner of machine from AD using search filters Modify the standard zim.cfg file ; Read zisd:VendorDataENGL zisd:get,VendorDataENGL,VendorDataENGLSTRING ; Read stored information in from VendorDataENGL Set:zisd_project,GetKeyPairStringValue("%VendorDataENGLSTRING%", "project") Set:zisd_owner,GetKeyPairStringValue("%VendorDataENGLSTRING%", “Owner") Set:zisd_owner_firstname,GetKeyPairStringValue("%VendorDataENGLSTRING%", “Owner_firstname") Set:zisd_owner_surname,GetKeyPairStringValue("%VendorDataENGLSTRING%", “Owner_surname") This reads in ZISD:VendorDataENGL and sets additional variables based on the info (if it exists) that is stored in the Owner key pair strings

Copyright © Expert Networking Group Limited 50 Scenario Selecting owner of machine from AD using search filters Add LDAP authentication Label:ztoolkit_computername ; Check for an AssetTag we can use for the DMI_NAME Set:DMI_NAME,"" If:Var,dmi_board_asset,ne,"" Set:DMI_NAME,"%dmi_board_asset%" ElseIf:Var,dmi_chassis_asset,ne,"" Set:DMI_NAME,"%dmi_chassis_asset%" End: Set:COMPUTERNAME,"" ; Read the Computername in from ZISD (if it exists) Zisd:Get,NetBiosName,ZISD_COMPUTERNAME If:Var,ZISD_COMPUTERNAME,ne,"" Set:COMPUTERNAME,%ZISD_COMPUTERNAME% Else: Set:COMPUTERNAME,"%DMI_NAME%" End: Label:ztoolkit_computername ; Check for an AssetTag we can use for the DMI_NAME Set:DMI_NAME,"" If:Var,dmi_board_asset,ne,"" Set:DMI_NAME,"%dmi_board_asset%" ElseIf:Var,dmi_chassis_asset,ne,"" Set:DMI_NAME,"%dmi_chassis_asset%" End: Set:COMPUTERNAME,"" ; Read the Computername in from ZISD (if it exists) Zisd:Get,NetBiosName,ZISD_COMPUTERNAME If:Var,ZISD_COMPUTERNAME,ne,"" Set:COMPUTERNAME,%ZISD_COMPUTERNAME% Else: Set:COMPUTERNAME,"%DMI_NAME%" End: ; Authenticate to LDAP server LDAP:Init,"labsrv.engllab.local",389 If:Var,_error,eq,1 Dialog:Ask,"LDAP Bind Error","%_ldaperrorstr%","_any",RED LDAP:Unbind Menu:Return End:

Copyright © Expert Networking Group Limited 51 Scenario Selecting owner of machine from AD using search filters label:owner_form ; Launch a Form to prompt for machine Owner Form:Start,"Owner","User Details","_NextCancel^_Next",Blue Form:Item,"Item1",StaticText,"Enter Owner details" Form:Item,"Item2",Label,"Firstname :" Form:Item,"Item3",EditBox,"%zisd_owner_firstname%" Form:Item,"Item4",Label,"Surname :" Form:Item,"Item5",EditBox,"%zisd_owner_surname%" Form:Item,"Item6",StaticText,"-Minimum 1 character in each box" Form:Display,"Owner" If:Var,_Form,Eq,"_Cancel" Menu:Return End: Set:ask_owner_firstname,%_owner_item3% Set:ask_owner_surname,%_owner_item5% ; Validate Owner info (need minimum of 1 character required for filter to be valid) if:var,ask_owner_firstname,eq,"" set:owner_valid,False end: if:var,ask_owner_surname,eq,"" set:owner_valid,False end: if:var,owner_valid,eq,"False" dialog:banner,"invalid Owner information detected \n Please re-enter",1,red set:owner_valid,"" goto:owner_form end: Configure a Zim form to prompt for Owner information

Copyright © Expert Networking Group Limited 52 Scenario Selecting owner of machine from AD using search filters label:validate_form ; Launch a Form to display detected hardware and select machine type Form:Start,"validate","Confirm Owner","_BackNextCancel^_Next",Blue Form:Item,"Item1",Label,"Select Owner :" Form:Item,"item2",ListBox_LDAP,"","DC=engllab,DC=local",SUBTREE,"(&(objectclass=Person)(givenName=%ask_owner_firstname% *)(sn=%ask_owner_surname%*)(!(objectclass=computer)))","sAMAccountName" Form:Item,"Item3",Label,"Check Yes to lookup local user details if required:" Form:Item,"Item4",Radiobuttons,"No","Yes,No" Form:Display,"validate" If:Var,_Form,Eq,"_Cancel" Menu:Return End: If:Var,_Form,Eq,"_Back" Goto:owner_form End: Set:valid_owner,%_validate_item2% Set:valid_owner_dn,%_validate_item2_ldap_dn% Set:valid_check,%_validate_item4% if:var,valid_owner,eq,"" ; Owner validation has failed - need to re-input Owner information set:ask_owner_firstname,"" set:ask_owner_surname,"" dialog:banner,"Invalid Owner details detected \n Please re-enter",3,red Goto:owner_form end: ; Read in additional account attributes ; displayName LDAP:GetAttr,"%valid_owner_dn%","displayName",ldap_displayName ; userPrincipalName LDAP:GetAttr,"%valid_owner_dn%","userPrincipalName",ldap_userPrincipalName ; sAMAccountName LDAP:GetAttr,"%valid_owner_dn%","sAMAccountName",ldap_sAMAccountName ; givenName LDAP:GetAttr,"%valid_owner_dn%","givenName",ldap_givenName ; sn LDAP:GetAttr,"%valid_owner_dn%","sn",ldap_sn Validate Owner information and Display (if selected)

Copyright © Expert Networking Group Limited 53 Scenario Selecting owner of machine from AD using search filters If:var,valid_check,eq,"Yes“ ; Launch a Form to validate local user entered prieviously Form:Start,"accountcheck","Additional local user lookup","_BackNextCancel^_Next",Blue Form:Item,"Item1",StaticText,"-The local user has been entered as : %valid_owner%" Form:Item,"Item2",StaticText,"-Additional information" Form:Item,"Item4",StaticText,"-Full Name : %ldap_displayName%" Form:Item,"Item5",StaticText,"-First Name : %ldap_givenName%" Form:Item,"Item6",StaticText,"-Surname : %ldap_sn%" Form:Item,"Item7",StaticText,"-AD Name : %ldap_userPrincipalName%" Form:Item,"Item8",StaticText,"-Account name : %ldap_sAMAccountName%" Form:Item,"Item9",StaticText,"-Click on back twice to re-enter the local user information" form:display,"accountcheck" If:var,_Form,eq,"_cancel" Menu:Return End: If:var,_Form,eq,"_Back" goto:validate_form End: ; Launch a Form to display detected hardware and select machine type Form:Start,"info","Confirm information","_BackFinishCancel^_Finish",Blue Form:Item,"Item1",StaticText,"-Manufacturer : %lookup_section%" Form:Item,"Item2",StaticText,"-Model : %lookup_value%" Form:Item,"Item3",StaticText,"-Hardware Image : %drivers_image%" Form:Item,"Item4",StaticText,"-Hardware Type : %machine_type%" Form:Item,"Item5",StaticText,"-OS : %project_os%" Form:Item,"Item6",StaticText,"-Owner : %valid_owner%" Form:Item,"Item7",Label,"Computer Name :" Form:Item,"Item8",EditBox,"%COMPUTERNAME%" Form:Item,"Item9",Label,"Auto Restart after imaging:" Form:Item,"Item10",Radiobuttons,"Yes","Yes,No" form:display,"info" Set:Ask_COMPUTERNAME,%_Info_item8% Set:AutoRestart,%_Info_item10% If:Var,Ask_COMPUTERNAME,ne,"%COMPUTERNAME%" Set:COMPUTERNAME,"%Ask_COMPUTERNAME%" End: Display user and workstation details

Copyright © Expert Networking Group Limited 54 Scenario Selecting owner of machine from AD using search filters Dialog:Popup,"Restoring ENGL Smart Windows build process, please wait...",green Pause:3 File:Run,"img %imgrestorecmd%project_image_path%/%base_image%",verbose File:Run,"img %imgrestorecmd%project_image_path%/hotfixes.zmg",verbose If:Var,machine_type,eq,"tablet" File:Run,"img %imgrestorecmd%project_image_path%/tablet.zmg",verbose End: File:Run,"img %imgrestorecmd%project_image_path%/%project_novcomp%",verbose File:Run,"img %imgrestorecmd%project_image_path%/%project_ztoolkit%",verbose File:Run,"img %imgrestorecmd%project_image_path%/%drivers_image%",verbose Pause:2 Dialog:Popupclose ; Update the information in ZISD Zisd:Put,NetBiosName,%COMPUTERNAME% ; Update VendorDataENGL (sample) Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Machine_Type","%machine_type%") Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","OS","%project_os%") Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Project","%lookup_project%") Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Owner","%valid_owner%") Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Owner_surname","%ldap_sn%") Set:VendorDataENGLSTRING,PutKeyPairStringValue("%VendorDataENGLSTRING%","Owner_firstname","%ldap_givenName%") ZISD:Put,VendorDataENGL,"%VendorDataENGLSTRING%" Zisd:Write ; Trap ZISD:Write errors If:Var,_ERROR,ne,"0" Dialog:Ask,"Error!","An error occurred writing information to ZISD!","_Ok",red End: If:Var,AutoRestart,eq,"Yes" Goto:reboot End: Menu:Return Update information being written to ZISD

Copyright © Expert Networking Group Limited 55 Scenario Selecting owner of machine from AD using search filters Note: The information used to configure the LDAP filtering can be customised to filter on whichever attribute you need to use, for some scenarios the surname, sAMAccountName or Display Name may be more appropriate to use. If you require assistance in configuring forms to meet your needs contact us and we will be happy to assist.

Copyright © Expert Networking Group Limited 56 Demo Selecting owner of machine from AD using search filters

Copyright © Expert Networking Group Limited 57 Scenario Selecting owner of machine from AD using search filters

Copyright © Expert Networking Group Limited 58 Summary

Copyright © Expert Networking Group Limited 59 Summary The standard zim.cfg file can be modified and extended to ensure that Zim meets your requirements.

Copyright © Expert Networking Group Limited 60 Issues

Copyright © Expert Networking Group Limited 61 Issues If you would like any more information or assistance with the procedures detailed in this TechBite let us know! Log an incident on englnet Report an issue via support forum - engl.support.imagingtoolkit6.imaging

Copyright © Expert Networking Group Limited 62 More information

Copyright © Expert Networking Group Limited 63 More Information Useful links  Product information and Downloads  Success Stories  Partners

Copyright © Expert Networking Group Limited 64 More Information Future Events  Tech Bite sessions  Brainshare