maurice-daly / DriverAutomationTool

Home of the Driver Automation Tool
https://www.msendpointmgr.com
BSD 2-Clause "Simplified" License
382 stars 114 forks source link

Urgent Help Please - Task sequence not working with new 4.2.0 ps1 script #364

Open shaikh441 opened 2 years ago

shaikh441 commented 2 years ago

Hi All I am currently testing the latest 4.2.0 ps1 script as I am building new 21H2 images, however the task sequence continuously fails with the script and also does not create the ApplyDriverLog to see what it is failing on.

I have run the script in DebugMode on the same machine being imaged, and the script runs without any errors and also matches a driver package from our SCCM repository.

I have the below parameters set in the task sequence (endpoint replaced with our site server): -BareMetal -Endpoint "xyz.ac.uk" -TargetOSName "Windows 10" -TargetOSVersion "21H2"

I initially have the driver tool as a nested task sequence in the main task sequences, but I have also tried without but same results. SCCM produces a very vague log but from there all I can see is the script does start to run but completes with exit code 1 (error), which is odd as it runs fine in debug.

Any ideas on what could be going wrong or things I could check?

Urgent help please as need to roll out 21H2 to over 2000 machines.

Thanks!

rlgura commented 1 year ago

Even though the examples show double quotes, I had to use single quotes

-BareMetal -EndPoint 'myserver.mycompany.net' -TargetOSName 'Windows 10' -TargetOSVersion '20H2'

But when I had this issue, I was at least getting a log that indicated it didn't match "Windows"

cincydash commented 1 year ago

I've got this same issue. I've tried it both ways with single and double quotes, and I cannot figure it out. It's not generate a ApplyDriverLog.log file for me to view to figure out the issue. Any luck?

shaikh441 commented 1 year ago

@cincydash Fortunately as soon as I changed to single quotes (thanks to @rlgura) it worked perfectly fine. So my parameters are now like this: -BareMetal -Endpoint 'fqdn.server.name' -TargetOSName 'Windows 10' -TargetOSVersion '21H2'

NoDowt commented 1 year ago

Came across this also yesterday when updating on our end. For reference, the use of single quotes for run powershell step is mentioned in the MECM doco - https://docs.microsoft.com/en-us/mem/configmgr/osd/understand/task-sequence-steps#BKMK_RunPowerShellScript

cincydash commented 1 year ago

The single quotes were part of my issue. The other part was I didn't have WinPE-Dot3Svc in my boot image. Here's the components I have in mine (not just for MDM but also for some other tools) and I was able to get MDM to work:

WinPE-DismCmdlets WinPE-Dot3Svc WinPE-HTA WinPE-StorageWMI WinPE-NetFx WinPE-PowerShell

I haven't been able to find this referenced in the MDM documentation anywhere, as to what Optional Components should be in our boot images to make it work. Am I missing something?

NoDowt commented 1 year ago

I don’t think we had to add anything extra from what we were already using, it has been a while since we first set it up though.

If I remember I’ll check what we have enabled in our boot image on Monday. The definite thing you would need is the winpe-powershell.