I appreciated your reply earlier, especially since you have moved on from this sort of thing.
I was mostly trying to avoid adding releaseID/display version to all my packages, since that side is all automated with the Driver Automation Tool.
I seem to have it working with a couple of changes.
I added this parameter to the script command:
-DriverPackageWinVer '%DriverPackageWinVer%'
-ServerFQDN '%AS_HOSTFQDN%' -Username '%AS_Username%' -Password '%AS_Password%' -BypassCertCheck %BypassCertCheck% -Manufacturer '%DATManufacturer%' -Model '%DATModel%' -SystemSKU '%DATSystemSKU%' -PackageType '%PackageType%' -PilotPackages %PilotPackages% -DriverPackageOSArch '%DriverPackageOSArch%' -DriverPackageWinVer '%DriverPackageWinVer%' -DriverPackageReleaseId %DriverPackageReleaseId% -CurrentBIOSVersion '%DATCurrentBIOSVersion%' -CurrentBIOSReleaseDate '%DATCurrentBIOSReleaseDate%' -LogPath %_SMSTSLogPath%
-ExternalUrl '%AS_ExternalUrl%' -TenantId %AS_TenantId% -ClientId %AS_ClientId% -ApplicationIdUri %AS_ApplicationIdUri% -Username '%AS_Username%' -Password '%AS_Password%' -BypassCertCheck %BypassCertCheck% -Manufacturer '%DATManufacturer%' -Model '%DATModel%' -SystemSKU '%DATSystemSKU%' -PackageType '%PackageType%' -PilotPackages %PilotPackages% -DriverPackageOSArch '%DriverPackageOSArch%' -DriverPackageWinVer '%DriverPackageWinVer%' -DriverPackageReleaseId %DriverPackageReleaseId% -CurrentBIOSVersion '%DATCurrentBIOSVersion%' -CurrentBIOSReleaseDate '%DATCurrentBIOSReleaseDate%' -LogPath %_SMSTSLogPath%
Defined as:
[parameter(Mandatory = $false, HelpMessage = "For DriverPackages only: Specify the version of Windows (ex: Windows 10).", ParameterSetName = "Intranet")]
[parameter(Mandatory = $false, HelpMessage = "For DriverPackages only: Specify the version of Windows (ex: Windows 11).", ParameterSetName = "Internet")]
[string]$DriverPackageWinVer = "Unknown",
Then Filtered similar to ReleaseID:
Filter for OS version
Add-TextToCMLog $LogFile "Filtering driver packages for the specified OS type: "$DriverPackageWinVer
"" $component 1
$Packages = $Packages | Where-Object{$_.Name -like "* $DriverPackageWinVer*"}
Add-TextToCMLog $LogFile "Count of packages after filter processing: $(($Packages | Measure-Object).Count)" $component 1
I then used another powershell step to populate my new variable
(Get-CimInstance win32_operatingsystem | % caption) -replace("Microsoft ","") -replace(" Enterprise","")