Using PEBuilder, you can include custom scripts in your WinPE. The agent runs the scripts at the specified point in the provisioning workflow to customize machines.


Create or identify the script you want to use.

Your script must return a non-zero value on failure to prevent machine provisioning failure.


Save the script as NN_scriptname.

NN is a two digit number. Scripts are executed in order from lowest to highest. If two scripts have the same number, the order is alphabetical based on scriptname.


Make your script executable.


Place your scripts in the appropriate Plugins\VRM Agent\VRMGuestAgent\site\work item subdirectory of the PEBuilder installation directory.

For example, C:\Program Files (x86)\VMware\vCAC\PE Builder\Plugins\VRM Agent\VRMGuestAgent\site\SetupOS.

Custom scripts are most commonly run with the work items SetupOS (for create provisioning) and CustomizeOS (for clone provisioning), but you can run scripts at any point in the workflow.

The agent runs the script in the order specified by the work item directory and the script file name.