NickolajA / PowerShell

141 stars 62 forks source link

GetCMOSImageVersionForTaskSequence returns multiple OS versions. [Invoke-CMDownloadDriverPackage.ps1] #3

Open xer0nine opened 7 years ago

xer0nine commented 7 years ago

Thank you for writing this script! I've been using it for a while now but for some reason a new behavior is present that confuses me:

$TSPackageID = $TSEnvironment.Value("_SMSTSPackageID")
$OSImageVersion = $WebService.GetCMOSImageVersionForTaskSequence($SecretKey, $TSPackageID)

returns:

Retrieved OS Image version from web service: 10.0.14393.0 6.1.7601.23392 6.1.7601.23572

then when it enters the switch for $OSName it always returns:

Determined OS name from version: Windows 7

This is not accurate as a Windows 10 image has been applied. This triggers:

Package does not meet computer model and manufacturer criteria: Drivers - Lenovo X260 - Windows 10 x64 Empty driver package list detected, bailing out

Any thoughts in what may cause this to always flag Windows 7?

NickolajA commented 7 years ago

Do you have any extra Apply Operating System steps? The web method is looking through all there references of an OS Image type for the task sequence.

markaldridge commented 7 years ago

@NickolajA I can confirm this issue happens when using the Windows 10 1709 VLSC ISO which has 6 images as mentioned on following blog post. https://blogs.technet.microsoft.com/windowsitpro/2017/10/13/windows-10-version-1709-coming-soon/

NickolajA commented 7 years ago

I never built any check for grabbing the selected index from the task sequence. Code for this have been built and tested and will be included in ConfigMgr WebService 1.5.0.

SureshVijayaraghavan commented 6 years ago

@NickolajA Any update when you are going to release the ConfigMgr WebService 1.5.0 ? Like Mark we are also having the same issue when we use the Win 10 1709 VLSC ISO which is having 6 indexes.

markaldridge commented 6 years ago

This has been fixed in an updated version of the script which is https://github.com/SCConfigMgr/ConfigMgr/blob/master/Operating%20System%20Deployment/Drivers/Invoke-CMApplyDriverPackage.ps1

There are less steps needed in your task sequence as this script downloads and applies the drivers. Make sure you read step STEP 3 - CONFIGURE YOUR TASK SEQUENCE http://www.scconfigmgr.com/modern-driver-management/

SureshVijayaraghavan commented 6 years ago

@NickolajA Thanks for your email. Am trying to do a In-Place upgrade from Windows 7 to Windows 10. So, am looking to just stage or download the drivers and let the Windows setup does the injection part of the drivers. You mean can I use the same Invoke-CMApplyDriverPackage.ps1 for just staging the drivers.?

SureshVijayaraghavan commented 6 years ago

@NickolajA Am attaching the log file for the error message when i try to stage the drivers using the webservice.

ApplyDriverPackage.log