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.
This topic is 2 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 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: 397
Last visit: Thu Oct 27, 2022 5:57 am

Re: Multi USB OSDBootMedia Solution

Post by localpct »

I knew I should have edited it, that’s the -UpdateScript :)
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 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: 397
Last visit: Thu Oct 27, 2022 5:57 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 3136 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: 397
Last visit: Thu Oct 27, 2022 5:57 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
This topic is 2 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked