PowerShell Script to PPKG
In this example, the PowerShell script Set-OemModel.ps1 will be converted to a Provisioning Package. This script is part of OSConfig and found in the OSConfig\Scripts directory. This script has a simple purpose of setting the OEM Model information in System Properties.
Windows Imaging and Configuration Designer
If you don't have WICD installed, you can get it from the Windows 10 ADK. Create a new Project
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_jCJJhBsj6EjMpC6a%252F2018-09-04_12-58-43.png%3Falt%3Dmedia%26token%3D209ee04f-90b4-4e55-8ac1-720697b0b2e3&width=768&dpr=4&quality=100&sign=2046cae2&sv=1)
Switch to Advanced Editor
Switch from the Basic to the Advanced Editor
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_jU-CvnhOcjlzogri%252F2018-09-04_12-59-34.png%3Falt%3Dmedia%26token%3D8dc69a34-951f-4812-b898-55905f2361ca&width=768&dpr=4&quality=100&sign=eeb452cd&sv=1)
Remove Runtime Settings
Select Runtime settings from the right Navigation Pane and select Remove
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_k2xpxXmCFhxAWV_M%252F2018-09-04_13-01-41.png%3Falt%3Dmedia%26token%3D10107926-b6ad-4f36-8076-1a5005b608ef&width=768&dpr=4&quality=100&sign=f49432fd&sv=1)
Create a ProvisioningCommand
In the left Navigation Pane, expand ProvisioningCommands and PrimaryContext. Add a Name and press the Add button
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_kzg8AiNUzT7hKw_1%252F2018-09-04_13-05-18.png%3Falt%3Dmedia%26token%3Dc22e40d4-426f-4ba4-a07c-d17be34e7fa7&width=768&dpr=4&quality=100&sign=eabaa474&sv=1)
Set the Command
Select the Command on the Left Navigation Pane. In the Main window, Browse for the PowerShell file and enter the following CommandLine
Set the other values
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_mfhMrDXFEkYQY_G2%252F2018-09-04_13-13-17.png%3Falt%3Dmedia%26token%3Dd22dce08-32c8-4551-b910-084b6b11782e&width=768&dpr=4&quality=100&sign=6a310b1e&sv=1)
Export the Provisioning Package
Select Export from the top Menu and then select Provisioning package
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_nCQvCpQPrRXINS8B%252F2018-09-04_13-16-02.png%3Falt%3Dmedia%26token%3D3cc94aa9-5a44-40ff-84b2-508237c0853c&width=768&dpr=4&quality=100&sign=82a85eeb&sv=1)
Build Owner
Change the Build Owner to IT Admin
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_nSMXNDydHD3b6IHN%252F2018-09-04_13-16-57.png%3Falt%3Dmedia%26token%3D7a0db67b-5c89-481e-bd2c-3c875be70900&width=768&dpr=4&quality=100&sign=8d6b1b86&sv=1)
Build Security
Leave this blank for general Provisioning
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_ngRG3xiRmfZQMAVC%252F2018-09-04_13-17-55.png%3Falt%3Dmedia%26token%3Da8d2b017-b68f-4589-9bb2-4dffceee02cd&width=768&dpr=4&quality=100&sign=68607edc&sv=1)
Save Path
Set the proper location to save the Provisioning Package
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_oJw6vABFEL3WR8MR%252F2018-09-04_13-20-52.png%3Falt%3Dmedia%26token%3Da2bbaeda-9fb8-47ee-be70-cba4d3d8778d&width=768&dpr=4&quality=100&sign=43b30e39&sv=1)
Build
Build the Provisioning Package
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_oT9YOsYzucXJdin2%252F2018-09-04_13-21-30.png%3Falt%3Dmedia%26token%3D5058e56d-7039-4b47-9dcb-c894b3c85736&width=768&dpr=4&quality=100&sign=5a64aae0&sv=1)
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_oYTvxfO4Tzrq2DW1%252F2018-09-04_13-22-10.png%3Falt%3Dmedia%26token%3D91ca5869-c74c-4dfb-b6fc-1e8f4a8047b2&width=768&dpr=4&quality=100&sign=ca229835&sv=1)
Testing
You can easily test a Provisioning Package by simply double clicking on the file. You will be prompted for confirmation
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_or4RIIX_qaA1SHrg%252F2018-09-04_13-23-09.png%3Falt%3Dmedia%26token%3D559a893d-44b9-4ff0-b4a7-ba075cedc749&width=768&dpr=4&quality=100&sign=bcb2f857&sv=1)
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_hfn01nEHFwm-_y4g%252F-LL_p7sI1Y_e-kTCklpL%252F2018-09-04_13-24-13.png%3Falt%3Dmedia%26token%3D791a5ac6-547e-44ae-bd56-ab6b320ec11b&width=768&dpr=4&quality=100&sign=6954f366&sv=1)
Validation
Here is a before and after to show the results
![](https://osconfig.osdeploy.com/~gitbook/image?url=https%3A%2F%2Fblobscdn.gitbook.com%2Fv0%2Fb%2Fgitbook-28427.appspot.com%2Fo%2Fassets%252F-LDKRxGiKLYjW1gana2O%252F-LL_rCpxohq9rY3wAhfF%252F-LL_rIejahPnEIr3inHP%252F2018-09-04_13-32-32.png%3Falt%3Dmedia%26token%3D570f6773-eeee-45d0-b2ff-0ec3c3405ed5&width=768&dpr=4&quality=100&sign=a732055f&sv=1)
Download
You can download the Provisioning Package created in this page by selecting the link below
Further Information
Provisioning Packages are expanded to the Current User %Temp% directory
In the case of Provisioning Packages that are executed in OOBE, they are in the following location
Last updated