You make PowerShell scripts available to be invoked by importing them into Model Manager.

About this task

Files in the Model Manager have both a version and a revision. When you import a file or update a stored file, you can optionally provide a version number (the default is 0.0). Revisions are automatically created each time a file of a specific version is imported or updated. For example, you can separately import a MyPowerShellScript1.ps1 version 1.0 and MyPowerShellScript1.ps1 version 2.0. If you later update version 2.0, Model Manager maintains the following files:

  • MyPowerShellScript1.ps1 1.0 1

  • MyPowerShellScript1.ps1 2.0 1

  • MyPowerShellScript1.ps1 2.0 2


  1. Open a command prompt.
  2. Run the CloudUtil.exe command with the following arguments to import your custom PowerShell scripts:
    CloudUtil.exe File-Import -n|--name <Friendly name to assign> -f|--filename <Path and file name> 

    Optionally, you can add a description and version to the custom script, specify a Model Manager host, and request a stack trace in case of error.

    CloudUtil.exe File-Import -n|--name <Friendly name to assign> -f|--filename <Path and file name> -d|--description 
    <Description> -i|--iteration <Version number> --repository <Model Manager Root URI> 
  3. Repeat this procedure for each of your custom PowerShell scripts.
  4. Record the names you assigned to your scripts with the command -n|--name <Name>.

    Tenant administrators and business group managers require these names to call your scripts.

Importing a Custom PowerShell Script

For example:

CloudUtil.exe File-Import -n|--name MyPowerShellScript -f|--filename MyPowerShellScript101.ps1 -d|--description 
use this script with Pxe.Setup.ScriptName -i|--iteration 3.0 --repository