Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

With the release of Imaging Toolkit 10.0.9 we have added the ability to create a deployment process that can be used with any cloud based endpoint management solution. This blog demonstrates how to configure a deployment project to deploy Windows 10 1709 and integrate with AutoTask Endpoint Management (AEM).

An AEM job will be used to deliver a set of applications to a registered device in a specified order, for example:

The last component in the job is used to run a script to create a registry key. This script flags that the application installation process has completed:

' Finish the app install phase
Set Utils   = CreateObject("ENGL.Ztoolkit.Utils")
Utils.Run "Reg add HKEY_LOCAL_MACHINE\SOFTWARE\ENGL\Ztoolkit\AEMApps", 0, False

The job is configured to run when a new client device first connects to the AEM site.

Once an Imaging Toolkit deployment project has been created, and the AEM agent is downloaded from the management console, the project can be configured to install the AEM agent and deliver applications.   

The AEM agent installs silently by default, so the installation script just needs to execute the agent file. A powershell script (install-autotask.ps1) is used to run the agent install so that status updates can be sent to a Deployment Monitor server:

$Utils = new-object -comobject "ENGL.Ztoolkit.Utils"
$Monitor = new-object -comobject "ENGL.Ztoolkit.Monitor"

# Send status update - AutoTask install start
$Monitor.Task = "Installing AutoTask Agent"
$Monitor.Status = "Started"
$ret = $Monitor.SendUpdate()

$Status = $Utils.AppendLog("Running: AutoTask agent")

# Send status update - AutoTask install end
$Monitor.Task = "Installing AutoTask Agent"
$Monitor.Status = "Finished"
$ret = $Monitor.SendUpdate()

# Send status update - AutoTask scheduled job start
$Monitor.Task = "AutoTask scheduled job"
$Monitor.Status = "Started"
$ret = $Monitor.SendUpdate()

# Launch Monitor script to wait for AutotaskApps registry key to exist
$Utils.appendlog("Monitor for lastappinstalled flag")
$status = $Utils.Run("powershell.exe -ExecutionPolicy Bypass -File C:\ztoolkit\phase3-lastapp.ps1", 0, $false)

A second script (phase3-lastapp.ps1) is required to monitor the AEM job progress and detect when the application installation process has completed.

$Utils = new-object -comobject "ENGL.Ztoolkit.Utils"
# Wait for AutotaskApps registry key to exist
while (!(Test-Path HKLM:\SOFTWARE\ENGL\Ztoolkit\AEMApps)) { Start-Sleep 10 }

# Wait for AEM status messages to send
$utils.AppendLog("Waiting 2 minutes to let AEM status messages process")
Start-Sleep 120
# Send status update - AutoTask scheduled job finished $Monitor.Task = "AutoTask scheduled job" $Monitor.Status = "Finished" $ret = $Monitor.SendUpdate() # Complete app install process $utils.AppendLog("Completing app install process") $status = $"c:\ztoolkit\zmainrun.exe /build /lastappinstalled" ,0,$false)

Once the powershell scripts have been configured, add the scripts and the AutoTask agent (agentsetup_managed.exe) to the Custom Files section of the project.


The Applications section of the project is enabled and the Command line set to run the install-autotask.ps1 powershell script that was added to the project:

powershell.exe -ExecutionPolicy Bypass -File C:\ztoolkit\install-autotask.ps1

For example:

When the project is deployed to a device, the deployment process is monitored using Deployment Monitor: 

On completion the device has the required applications and is manageable from the AutoTask console.

To see the whole process in action, take a look at this video.

Keep an eye on the Imaging Toolkit product page and social media for more details on custom deployment with any endpoint management solution. If you are interested in testing Imaging Toolkit 10.0.9 with AutoTask Endpoint Management or any other deployment solution please get in touch.