MSEndpointMgr / ConfigMgr

Microsoft Endpoint Configuration Manager scripts and tools
633 stars 281 forks source link

Invoke-CMApplyDriverPackage.ps1 (2.1.9) - Call to ConfigMgr WebService returned empty OS image data #130

Closed simulacra75 closed 4 years ago

simulacra75 commented 5 years ago

Weird one. I have 4 separate SCCM Primary Site servers, all of which are running the ConfigMgr WebService.

All of them work (or seem to) apart from one, and, it's not completely "broken". It's when attempting to run the above .ps1 script.

If i attempt to run a sub-section of the code in the above, namely the section where it attempts to determine the OSImage data (line 363 onwards), on 3 of my sites, the variable $OSImages returns data, on my problematic site, nothing gets returned in $OSImages.

The Task Sequence assigned to the problematic site has the Apply Driver Step precisely the same as the 3 working sites (apart from the URL).

Anyone seen this before? Thanks.

EvilerBetty commented 5 years ago

We are now seeing this after updating to CB 1810 Hotfix Rollup (KB4488598) yesterday.

Correction: This apparently began a day or two before that. And possible only for certain task sequences. I'm going through the server side Logs$ to try to determine a common denominator and precise timing of when it began to occur.

As simulacra75, the Apply Driver steps are identical between the task sequences. The ones I suspect are not working are more advanced with nested task sequences.

vorlon77 commented 5 years ago

Did you update the libraries used by the webservice? The initial install grabs them from the console folder, but I don't know if updates are manual.

Allan. On Apr 10, 2019 4:48 PM, "EvilerBetty" notifications@github.com wrote:

We are now seeing this after updating to CB 1810 Hotfix Rollup (KB4488598) yesterday.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SCConfigMgr/ConfigMgr/issues/130#issuecomment-481896458, or mute the thread https://github.com/notifications/unsubscribe-auth/AoM9WIjTai_YaA2Jvj3gBrrSBJDB_owQks5vfmpCgaJpZM4ckPiv .

EvilerBetty commented 5 years ago

Web service for ConfigMgr Current Branch developed by Nickolaj Andersen (1.7.0)

I think my issue is the same issue as: https://github.com/SCConfigMgr/ConfigMgr/issues/7

I had not read through the release notes in the newer script versions well enough to catch the part about running multiple "Apply Operating System" steps in your TS, which I had added about a month ago but apparently wasn't paying attention to Device Manager after the TS was completed.

I've created "Set Task Sequence Variable" steps, setting "OSImageVariable" = "00100xx" etc. in the 1803 and 1809 TS folders and added ' -OSImageTSVariableName "OSImageVariable" to the "Dynamically Apply Drivers" step.

So far this hasn't solved my issue though. I'll run through more testing tomorrow.

===== SCConfigMgr Invoke-CMApplyDriverPackage Version 2.1.9 ==== 1/1/1601 12:00:00 AM 0 (0x0000) Driver download package process initiated 1/1/1601 12:00:00 AM 0 (0x0000) Manufacturer determined as: Dell 1/1/1601 12:00:00 AM 0 (0x0000) Computer model determined as: Latitude 5480 1/1/1601 12:00:00 AM 0 (0x0000) Computer SKU determined as: 07D0 1/1/1601 12:00:00 AM 0 (0x0000) Fallback SKU determined as: 07D0 1/1/1601 12:00:00 AM 0 (0x0000) Retrieved a total of 94 driver packages from web service 1/1/1601 12:00:00 AM 0 (0x0000) Attempting to detect OS Image data from task sequence, running in DeploymentType: BareMetal 1/1/1601 12:00:00 AM 0 (0x0000) Call to ConfigMgr WebService returned empty OS Image data. Error message at line : 1/1/1601 12:00:00 AM 0 (0x0000)

EvilerBetty commented 5 years ago

Turned out to be related to this: https://www.reddit.com/r/SCCM/comments/9ohkw1/modern_driver_management_multiple_apply_operating

After importing a new 1809 OS that was captured with MDT instead of SCCM, both 1803 and 1809 only have one image index entry and now the ApplyDriverPackage.log is populating, drivers are being installed.

NickolajA commented 5 years ago

Is this still an issue? I thought that I cracked that. What happens if you simply just run the web method query manually through PowerShell or a web browser on the server where the web service is running?

edr1986 commented 5 years ago

Same issue here. Using image with 1 index works fine.

EvilerBetty commented 5 years ago

I recall testing this manually with PowerShell, though I don't remember details of the attempt accept that it also failed. Right now I don't have an image with multiple index entries to retest this with.

elsalvos commented 5 years ago

I'm getting similar error with 1809 image with 1 index


===== SCConfigMgr Invoke-CMApplyDriverPackage Version 2.2.3 ==== 5/30/2019 2:54:24 PM ApplyDriverPackage 656 (0x0290) Driver download package process initiated 5/30/2019 2:54:25 PM ApplyDriverPackage 656 (0x0290) Manufacturer determined as: Dell 5/30/2019 2:54:25 PM ApplyDriverPackage 656 (0x0290) Computer model determined as: OptiPlex 5050 5/30/2019 2:54:25 PM ApplyDriverPackage 656 (0x0290) Computer SKU determined as: 07A2 5/30/2019 2:54:25 PM ApplyDriverPackage 656 (0x0290) Fallback SKU determined as: 07A2 5/30/2019 2:54:25 PM ApplyDriverPackage 656 (0x0290) Retrieved a total of 0 driver packages from web service 5/30/2019 2:54:34 PM ApplyDriverPackage 656 (0x0290) Attempting to detect OS Image data from task sequence, running in DeploymentType: BareMetal 5/30/2019 2:54:34 PM ApplyDriverPackage 656 (0x0290) Call to ConfigMgr WebService returned empty OS Image data. Error message at line : 5/30/2019 2:54:35 PM ApplyDriverPackage 656 (0x0290)

edr1986 commented 5 years ago

Is it possible to support nested task sequences?

justintime941 commented 5 years ago

I am getting this issue. I only have one image being applied. Index 1 and captured image. Log say there are no drivers and could not get OS architecture. I checked with Dism that there is an osversion property for architecture, build, etc. where should I look first?

elsalvos commented 5 years ago

Do you have any package as share and run remotely enable on the TS instead of d/l and run?

I had some issues so I just created my packages with zipped drivers and I unzip them at runtime and run dism. I'm a dell shop so I do the family driver and 4 cover 40% of systems.

On Wed, Jul 10, 2019, 4:04 PM justintime941 notifications@github.com wrote:

I am getting this issue. I only have one image being applied. Index 1 and captured image. Log say there are no drivers and could not get OS architecture. I checked with Dism that there is an osversion property for architecture, build, etc. where should I look first?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SCConfigMgr/ConfigMgr/issues/130?email_source=notifications&email_token=AEHOJJHB3WJTGOITLZNHE5TP6ZTJDA5CNFSM4HEQ7CX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZU753Q#issuecomment-510263022, or mute the thread https://github.com/notifications/unsubscribe-auth/AEHOJJCFDOP33ZDTWH4QUADP6ZTJDANCNFSM4HEQ7CXQ .

Jerzystransfer commented 5 years ago

I'm getting a similar error as others posting here. I have utilized the dism command to extract 1 index for my wim file. I have verified the webservice is running, installed the latest versions of the webservice as well as driver automation tool, have imported and distributed my drivers to my DP's and yet I still am receiving "Call to ConfigMgr WebService returned empty OS Image data.".. I believe I have read almost every article/tip surrounding this error but am pretty much dead in the water. I am querying for HP's as that is 99% of my inventory. Does anyone know what specific ports used by the tool? We recently had some firewall changes and that might be part of my issue but I have no way of testing that without knowing specifics. I also have attempted to put the url info into a browser and try to use the getcmpackage.. All of this has netted me very little. Any assistance on this would be greatly appreciated.

image

beanmeister commented 4 years ago

Had this same issue, found a workaround. My scenario, Using either a pre-cache or an upgrade task sequence ID kept failing because we are using pre-cache to download to a variable. Which means the Upgrade Operating System step does NOT select any image, but selects the variable and index ID. This indicates to me that the script specifically uses the "Upgrade Package field" of the "Upgrade Operating System step" in the TS to determine which image and therefore which windows edition.

Not ideal, but works as a workaround; created a DISABLED upgrade operating system step which selects the desired OS image, and 'bobs your uncle', it works again.

And yes, using a single image index; Using multi-index wim doesnt work with this method. Rather than using this method of finding the OS, would it not be better if a variable of sorts is used on the script? Means we don't need other manual remediation methods.