jantari / LSUClient

Orchestrate driver, BIOS/UEFI and firmware updates for Lenovo computers 👨‍💻
https://jantari.github.io/LSUClient-docs/
MIT License
208 stars 22 forks source link

WinPE Usage #86

Closed Herc08 closed 1 year ago

Herc08 commented 1 year ago

Version

1.5.3

Question

So I am trying to get this working in WinPE. Similar to MDM, this would be much easier as I can update the BIOS on demand.

Whenever I attempt to run this in WinPE, I faced with the following errors:

Get-PnpDevice : The term 'Get-PnpDevice' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At X:\Program Files\WindowsPowerShell\Modules\LSUClient\public\Get-LSUpdate.ps1:139 char:97
+ ... IncludePhantomDevices) { Get-PnpDevice } else { Get-PnpDevice -Presen ...
+                                                     ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-PnpDevice:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

WARNING: Exception calling "Start" with "0" argument(s): "The specified executable is not a valid application for this
OS platform."

WARNING: Exception calling "Start" with "0" argument(s): "The specified executable is not a valid application for this
OS platform."

Curious if anyone else is having issues. I will try making logs next to determine what's the issue. Any help is greatly appreciated.

jantari commented 1 year ago

so far I have not been testing or aiming for WinPE compatibility. Can you explain your usecase? Why you want to install BIOS updates from within WinPE rather than from the online full OS?

Herc08 commented 1 year ago

Well, I just learned it may not be possible for the original case, but it still can be beneficial. My original case was to take advantage of System Deployment Boot mode and change the supervisor password, along with other settings. However, I learned that even with eligible devices, a BIOS update was needed. However, even if you were able to get it working in WinPE, you lose the SDB mode once a reboot occurs (required a BIOS update), so it's kind of pointless.

But we handle hundreds of computers, and if I can update the BIOS during deployment with MECM, that makes my life easier. However, since I'm not a site admin, I don't have full access to the Modern Driver Management system we use.

That said, I wanted to update the BIOS (and possibly all recommended and critical drivers outside of Hotkey). Currently, I do install the TSU during deployment, but that requires one of us to log in and update the system before we give it to the user. I guess technically, I can wait until the end of the task sequence once the OS is installed and configured to run your module. I just like to get feedback within WinPE at the command line instead of waiting for the entire deployment.

I do have a main script that takes your module and gathers what I need, and it does work as intended. If it is not on your to-do list, it's no biggie. I can live without it. Sorry for the ramble.

On Tue, Apr 4, 2023 at 11:39 AM jantari @.***> wrote:

so far I have not been testing or aiming for WinPE compatibility. Can you explain your usecase? Why you want to install BIOS updates from within WinPE rather than from the online full OS?

— Reply to this email directly, view it on GitHub https://github.com/jantari/LSUClient/issues/86#issuecomment-1496199255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWZZMIB2FZH7CAHTC5Z4DVDW7Q6CNANCNFSM6AAAAAAWRZ2SNA . You are receiving this because you authored the thread.Message ID: @.***>

jantari commented 1 year ago

No worries and thank you for the explanation.

So the requirement for a BIOS update before SDB mode works is unfortunate, but Lenovo will surely ™ have that fixed in the next gen or newer manufacture date machines.

For using it during MDT/SCCM/MECM deployments, that definitelty works but you just have to do it in the FullOS phase, after WinPE. It doesn't have to be the very end of the task sequence, but definitely after WinPE. Even if it was possible, any drivers you'd install into the WinPE environment would ofc be gone once that shuts down so running in FullOS is definitely what I suggest. You can keep installing TSU to double-check nothing is missing, in fact that'd be very helpful for me because if there is ever a discrepancy or something TSU finds that LSUClient didn't it'd be great if you can open an issue about that and attach the TSU screenshot as well as the LSUClient output logs 😄

Basically, because:

  1. Making LSUClient WinPE compatible would be rather difficult (to achieve initially and then also to document restrictions and to continually test again whenever I make any updates)
  2. It would only be useful for firmware updates that "stick" permanently independent of the OS, not drivers or tools, so you'd often run LSUClient again later anyway to get those?
  3. It hasn't been requested before, so I don't think lots of people are interested in running LSUClient in WinPE
  4. Deployment methods like Autopilot don't even have a WinPE phase anymore

I currently have no plans to support WinPE. But like I said, please feel free to file other issues you encounter when you run in MDT/SCCM/MECM/whatever whilst in a full OS.