@Coolguy3289 Sorry for the crazy delayed reply, I just saw this, I must have missed the notification
This is what my general structure looks like. You would not need to recreate that with the + pseudo wildcards, that is part of my windows side matching that I have now actually replaced with this modellist method. The grep line will search each model folder in the given make folder regardless of its name. I will probably end up changing those folders to be something like HP ElitePro G# or something like that.
e880c851-3f3c-418d-adb9-8ff886199667-image.png
Then say I have a HP Elite Mini 600 G9 Desktop PC
This bit
makePth="/images/drivers/${make}"
cd $makePth;
Should get me into the /images/drivers/hp folder
Then this listFile=`grep -il "$model" ./*/*-ModelList.txt` should search each HP ModelList.txt for that model string using grep and return the matching modelList file with a match. In this case it would match /images/drivers/hp/HP + +00 G9+/HP + +00 G9+-ModelList.txt as that file looks like this where I have various possible matching model names these drivers apply to including the one being searched for
HP Elite Mini 600 G9 Desktop PC
HP Elitedesk 600 G9 DM
HP Elite Mini 800 G9 Desktop PC
HP Pro Mini 400 G9 Desktop PC
HP EliteOne 840 23.8 inch G9 All-in-One Desktop PC
And then this remotedriverpath="$makePth/${listFile%/*}" should point to the parent path of where the found ModelList.txt file was found and it will then proceed to inject that folder to `C:\Out-Of-Box Drivers\HP + +00 G9+
And as to creating those modelList.txt files, it’s easier than it sounds, especially if you use the fog api powershell module FogApi (see my signature).
For example, to get all my current HP (and any other make that stores the friendly name of their model in system-product-name) model names as they are detected by fog you would setup the FogApi module in powershell
Install-Module FogApi;
Set-FogServerSettings -interactive
Then this one liner would get all your fog host inventories, select just the sysman and sysproduct fields, and then sort it to unique model names giving you a list of model names you have in your inventory
(get-foghosts).inventory | select-object sysman,sysproduct | sort-object sysproduct -Unique
You’d also what to run these other 2 commands to get lists of other model names stored in system-version or baseboard-product-name
(get-foghosts).inventory | select-object sysman,sysversion | sort-object sysversion -Unique
(get-foghosts).inventory | select-object sysman,mbproductname | sort-object mbproductname -Unique
You could probably expound from there to programatically create to folder structure and the modelList files of your current hosts, but I don’t have time at the moment to get that deep into it. I don’t have that many different models and already had the folder structure so just getting those lists was all I needed to construct the model list files