I have a ps script started, and working %75 of how I want it to run. I'm trying to create a simple ps script that runs in winPE from a thumb drive, to allow my group to be able to easier apply images to machines out in remote locations with our existing win7 images.
Part of my script, I'm simply calling up dism to apply an image to drive 0, and it works. It's just that it works in the background with no output as to it's status; the only way you know it's working is either by looking at the hdd activity led on the machine, or, by waiting on the machine to reboot.
I've setup startnet.cmd to launch myscript.ps1 after loading winPE via booting to the thumb drive, and it boots into a simple gui page with some easy clicky buttons for random things we do often.
The snippit I'm trying to polish is:
Functiondo_DISMLaptop{
$command="dism /apply-image /imagefile:D:\W7x86-072514.wim /index:3 /applydir:C:\"
Invoke-Expression$command
}
On the main gui page, there's a button I've created that launches this function. What I'd like to do, is have this function open in a new window showing the progress so I don't have someone always telling me "I don't know if it's doing anything or not?"
I'm a network guy with very little coding experience, and I've googled my eyes dry on how to get this done, with no avail.
Any recommendations as to how to accomplish this? As powerful as I'm learning powershell is, surely there's an easy way?