Generate Driver Pack Content Items

Using PowerShell can be a nice way to automate the generate of driver pack content items and save a bit of time vs using the dashboard. There are a few steps in creating content items with PowerShell, first making the "Shell" Content Item, then the version item inside of it. Just a note, this is different than importing one you exported from another DeployR server, this is creating a completely new content item from scratch in an automated fashion.

You'll be leveraging a few different DeployR Function

  • New-DeployRContentItem

  • New-DeployRContentItemVersion

  • Update-DeployRContentItemContent (If updating previously created Item Version)

For this Example, I have a Dell Pro 14 Plus PB14250 device, I've downloaded and extracted the drivers to "D:\DeployRSources\DriverPacks\Dell\Pro 14 Plus PB14250" First we'll create the Content Item Shell, once completed, we'll see this in the Dashboard.

circle-info

Note, anytime we're using the DeployR functions and interacting with DeployR, you'll need to import and connect to DeployR, you can find this on the Scripting for DeployR Server page

$MakeAlias = 'Dell'
$ModelAlias = 'Pro 14 Plus PB14250'
$NewCI = New-DeployRContentItem -Name "Driver Pack - $MakeAlias - $ModelAlias" -Type Folder -Purpose DriverPack -Description "Generated for $MakeAlias - $ModelAlias"

Now that the shell is created, go ahead and create the version item. Grab the Content ID of the new item that was just created, and feed that into the New-DeployRContentItemVersion function.

This will take a while as it builds the content item in DeployR, but when it's done, you can refresh your dashboard and see

You can get a custom function on GitHub: https://github.com/2pintsoftware/2Pint-DeployR/blob/main/Automation/Import-DriverPackFolder.ps1arrow-up-right to help with importing already extracted drivers.

Last updated