Hello All! I need help with my powershell project.
Goal Overview:
Get all of the systems Hardware IDs and Device IDs
Look through all the Hardware IDs and Device IDs and when it makes a match, it’ll go and execute a specific driver.
2a) If the Hardware ID or Device ID gets a match, check to see if the drivers / software is already installed, if they are continue on with the script.
2b) When a driver / software gets installed and it needs to restart, restart the system and continue where the driver / software left off.
The purpose for this script(s) is to get the entire collection of Hardware IDs and Device IDs of a system and write the output to a file so it can install motherboard drivers and software. Next, I need the script to read the output and if it makes a match with one of the IDs, install the appropriate driver / software.
While installing the drivers / software – for example the chipset drivers (this requires a restart), I need the system to restart. When it gets back into Windows, I need the script to start and continue where it left off(This is the scripts POV in my head-- Oh I just finished installing the Chipset driver, next on my list is Audio, let me continue installing the drivers/software)
Hmmm … for how many different devices do you want to do that? Usually in an enterprise environment there is a limited amount of different hardware types and they can be provided with a prepared set of drivers.
Now, To match the hardware id’s with the drivers, to me seems like the easiest part. How would I delegate the install process? How would I continue where I left off after a restart?
You’ll need to create a task list that includes a status (Not started, rebooting, complete, etc) and store it in a file. Then you can pick up at the next step when the script restarts. You’ll probably need to create a scheduled task that runs after startup to kick off the script each time.
Wworkflows has the ability to continue on restarts and is the main advantage of using it. Scheduled jobs are not required here.
You could please go through below Blog post by Richard.
That article was a good read. I followed it and I am still having issues. When I first run the work flow , the system will restart, everything seems good. When I log back in, the job is still suspended even though I tell it to resume on logon. Below is a copy of my code:
Still you miss the point of Workflows, No need of using Scheduled tasks wen we have workflows.
I’m sure you will be able to make it, adding one more reference , must read and try and implement it in your way for your task
I still cannot get it to resume on it’s own. I always have to manually type it in powershell. When I go to the task scheduler and right click run, it will not perform the task.
I am also in Audit mode with sysprep. I don’t see this being an issue.