Scripting Question

KBE Powershell passing variable to post-install task

06/24/2015 2381 views

We are currently implementing Powershell within the KBE to run through a user creation script. 
As part of this script an Active Directory user is created and we would like to pass this through to a post-install task. 

Ultimately we are looking to automate the deployment, so that when it has been completed the user that was created is logged on. 

Please can someone advise if this has been done before, or offer some assistance with scripting?

Phil Rich 
0 Comments   [ + ] Show comments


All Answers

I would push your data to a text file that you put on the deployment drive, and then have a PO that reads the data from that file.  root/KACE would be a good location as it gets deleted during cleanup.

Answered 06/24/2015 by: cserrins
Red Belt

  • Thanks Corey, are you able to clarify what letter/drive the deployment drive is? If I write the file as a pre-install will the post-install task pick this up?

    As this is fairly new to me, is it an easy thing to pass data into the PO and what would I use (VBS, PS, BAT)?

    • Each of those languages allow you to output to a file, so it is fairly simple. You could of course hard code the drive letter of the deployed drive that would get windows, however, it would be better to read the EnvVars.xml file on x:\kace\engine\ for the system_drive
      You can do this as a preinstall, but only after you any partition/formatting tasks, otherwise it would get overwritten.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ