Links
🆕

PowerShell Script PPKG

OSD 23.5.23.1+ Updated May 23, 2023
In this example, I'm going to detail how to wrap a PowerShell script in a Provisioning Package. The best example I can use is the Provisioning Package that I created to expand Driver Packs in First Boot.

PowerShell Script

First you need to make sure you have a standalone PowerShell Script that does not require interaction as Provisioning Packages won't allow that. Here's my script that is saved in a PS1 file

Windows Configuration Designer

Open Windows Configuration Designer and select Advanced Provisioning
Advanced provisioning
Complete the details for your project and press Next
(1) Enter project details (2) Press Next
Select All Windows desktop editions and press Next
(1) All Windows desktop editions (2) Press Next
Press Finish

Runtime settings

Complete the following steps:
  1. 1.
    Expand Runtime settings
  2. 2.
    Expand ProvisoiningCommands, DeviceContext, CommandFiles
  3. 3.
    Press Browse
  4. 4.
    Find and select your PowerShell script
  5. 5.
    Press the Open button
Press the Add button
Press the Add button
Complete the following steps:
  1. 1.
    Select CommandLine
  2. 2.
    Enter the following command line (change the name of the PowerShell script to your file name)
PowerShell.exe -ExecutionPolicy Unrestricted .\Invoke-OSDCloudDriverPack.ps1
Press Export and Provisioning package
(1) Describe the provisioning package (2) Press the Next button
Press the Next button
Press the Next button
Press the Build button
(1) Click on the Project folder link (2) Press the Finish button
Complete Provisioning Package