Multi USB OSDBootMedia Solution

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
jvierra
Posts: 15049
Last visit: Tue Jan 25, 2022 12:00 am
Answers: 17
Has voted: 3 times
Been upvoted: 13 times

Re: Multi USB OSDBootMedia Solution

Post by jvierra »

You cannot update controls in the JobScript. That script IS the job that is running in an external process. It is not part of the script that created the job.
User avatar
localpct
Posts: 376
Last visit: Fri Jan 14, 2022 10:41 am

Re: Multi USB OSDBootMedia Solution

Post by localpct »

I knew I should have edited it, that’s the -UpdateScript :)
jvierra
Posts: 15049
Last visit: Tue Jan 25, 2022 12:00 am
Answers: 17
Has voted: 3 times
Been upvoted: 13 times

Re: Multi USB OSDBootMedia Solution

Post by jvierra »

Why are you selecting the next USB when the first one has not finished?

As I noted earlier you have design issues and need to have a design that is deterministic and that doesn't require interaction with the job except to start it and detect when it ends.
User avatar
localpct
Posts: 376
Last visit: Fri Jan 14, 2022 10:41 am

Re: Multi USB OSDBootMedia Solution

Post by localpct »

My apologies, this line is in the last step of my job script
New-Item -Path "$templetter\Make-OSDBootMedia.builddate" -ItemType File -Force


I needed to know what is in the $results and $job variables so I created a RTB, ran some test and noticed a consistent output of the new file I placed on the root current USB drive.
DriveLetter:\Make-OSDBootMedia.builddate
Snag_6499e8.png
Snag_6499e8.png (29.21 KiB) Viewed 1538 times
I left the bit about the treeview out because it wasn't working as expected. I will continue to work on this, as we're seeing success on different PCs, USBs, sizes, and interfaces :)
User avatar
localpct
Posts: 376
Last visit: Fri Jan 14, 2022 10:41 am

Re: Multi USB OSDBootMedia Solution

Post by localpct »

I revisited my code because some of your comments I didn't yet resolve until yesterday.
Less than three minutes to copy the new OSDBootMedia to the local machine and prepare three drives
In action for those curious
https://vimeo.com/665675894
Post Reply