OSDeploy / OSD

OSD Shared Functions
MIT License
130 stars 54 forks source link

Using -FindImageFile with an .esd and -ZTI #112

Closed dozi84 closed 4 months ago

dozi84 commented 4 months ago

Hello there, is it possible to use the -FindeImageFile switch with an .esd file on a network share and the -ZTI parameter? I've tryed serveral versions of parameters and variables and I'm not able to run it successfully. Thanks in advance.

Kind regards dozi

gwblok commented 4 months ago

Are you mapping the network drive ahead of time? Are you finding the .esd file you want to use? Does it work inside of the GUI? What currently works?

This is not a scenario I've tested or tried. I'm quite sure if you map the drive ahead of time, that the .esd file would show up in the GUI. If that's the case, you should be able to then look at the variables the GUI creates, and then in your own script, manually create those variables and call Start-OSDCloud with all of those variables pre-set.

dozi84 commented 4 months ago

Yes, I map the network drive in the ConfigMgr tasksequence right before starting OSDCloud. I'm using your solution to combine these two worlds and with the "normal" OSDCloud scenario it works like a charm. I want implement the solution with the .wim or .esd on an network share for pool-pc rooms, where i have to image like 20 pcs at the same time. I will try the things you gave me and report afterwards. Thank you!

dozi84 commented 4 months ago

So i have tested the Start-OSDCloudGUI, the .esd gets not recognized. The network share is connected successfully via Z:\OSDCloud\OS. I then checked, if I start Start-OSDCloud without the -ZTI parameter, wich resulted in the attached screenshots:

Screenshot 2024-02-16 095552 Screenshot 2024-02-16 095349 Screenshot 2024-02-16 100422 Screenshot 2024-02-16 095217 Screenshot 2024-02-16 095506 Screenshot 2024-02-16 095533 Maybe there is some misthinking on my side, but I think this should work this way :D.

gwblok commented 4 months ago

If you mapped the drive to Z, and you have esd or wim files in z:\osdcloud\os, they should show up under Start-OSDCloudGUI image

image

Looking at the variables: image

So I THINK (I'd need to test this), if you pre-set those variables, you should be able to have it run the WIM / ESD file from the network in a ZTI.

Please make sure you're running the latest module of OSD to ensure Start-OSDCloudGUI is running as expected and finding those WIM/ESD files on the network.

dozi84 commented 4 months ago

I have tested the following things but was not able to get the .esd-file to show up in the GUI:

On all tests I have used the newest OSD version, today that was version 24.2.20.1. I have not yet tested to preset the variables. First, I wanted to make sure the .esd-file would be recognized correctly... ;)

Any ideas what I am missing here?

gwblok commented 4 months ago

Can you post a screenshot of the esd files on your file share?

Can you stick a generic install.wim file in there as well?

If you run OSDCloudGUI, and choose the options in the drop down menus for the esd file you have on the share, does it work? Ex Windows 11 23H2, Volume, en-us, enterprise

The code it written to not show esd files that match ones in the catalog, only show esd files that aren't normally available to OSDCloud. However, it should still use your network cached copy of the ESD file.

I'll try to replicate once I see your esd files information on your network share.

dozi84 commented 4 months ago

Screenshot 2024-02-22 092535 I have put a install.wim with Windows 11 23H2 there aswell, doesn't work either. This happens, when i run Windows 11 23H2 Enterprise de-de: Screenshot 2024-02-22 093318 The file on Q: gets recognized but fails with following error after format: Screenshot 2024-02-22 093331

gwblok commented 4 months ago

when you're at that point that it failed, if you do a Test-Path for that source (Q:\OSDCloud\OS\22631.....), does it pass? Then try to do a manual copy to C:\OSDCloud\OS and see what happens Sorry, I haven't had much time to look into this more.

dozi84 commented 4 months ago

Path is there, but drive C: is missing somehow. Maybe the format step right before is not working? Screenshot 2024-02-23 085824 Screenshot 2024-02-23 090036 Screenshot 2024-02-23 090106

gwblok commented 4 months ago

Are you having the CM Task Sequence partition and format the drive? or as you using OSDCloud to do that? It looks like you're having OSDCloud do the formatting. You could try to have the TS do the formatting, and disable the format in OSDCloud

SkipAllDiskSteps = [bool]$True

image

dozi84 commented 4 months ago

I got it to work with Start-OSDCloudGUI like you described, if the SkipAllDiskSteps = $True. If i preset the other vars for the Start-OSDCloud -ZTI, it will fail with the following error:

Screenshot 2024-02-26 144036

At the moment I think it's not ment to be used like that. Maybe this is possible at some point for "large" scale deployments like a full class room PC pool ;-)

gwblok commented 4 months ago

Lets step back for a minute. What is your end goal, and technical requirements? Perhaps leveraging a common standard TS would be the best method to achieve this? I know a bit about ConfigMgr OSD and might be able to help you over any hurdles there too.

dozi84 commented 4 months ago

Ok, makes sense ;-). I have a working standard TS here for about 10 years now. But I have run into the problem, that I am the only one who can maintain drivers etc.. I am using the driver automation tool from Maurice Daly there, but it seems a little outdated the last few months. The goal is to simplify the maintenance of drivers, hsa apps, OEM software with OSDCloud. This is working like a charm for single deployments with downloading the stuff over the internet. For PC rooms with 20+ PCs this will result in an very slow download of the images and drivers. For this i wanted to put the .esd on an network share and download it from there. I really wanted to say thank you for your great work here and the time you invested to help me with this problem. I really learned a lot about OSDCloud in this process.

gwblok commented 4 months ago

Hey, are you in the WinAdmins discord or Twitter? I think we can move this conversation somewhere else. I'm happy to spend a little time with you going over your requirements and seeing if we can come up with a good solution. I know a fair bit about driver management with CM and I bet we can come up with a good solution. Look for me on Twitter or Discord - @gwblok - If you're not on WinAdmins Discord, you should be! I joined this year, and it's been a good community.

dozi84 commented 4 months ago

Hey, sorry for the late reply. Was busy testing... I got it working like i wanted: I saved all scripts to github and let it run from there: https://github.com/dozi84/SCCM/blob/main/Start-OSDCloud.ps1 The script is pulling the .esd from the network share in this process, as long as the .esd is matching the criteria, like you described before. I also can manage the version of the installed os with my collections vars like it is working at the moment. I will join the discord as soon as possible. On twitter i follow you already for many years ;-)