MSEndpointMgr / ConfigMgr

Microsoft Endpoint Configuration Manager scripts and tools
634 stars 281 forks source link

Use the ShowActionProgress method to display more information. #227

Open matbe opened 4 years ago

matbe commented 4 years ago

I added support for the ShowActionProgress / ShowActionDetailedProgress methods from Microsoft.SMS.TsProgressUI.

To be able to capture the output from DISM in recursive mode I wrote a new function that is using StandardOutput.ReadLine() to be able to parse the output into the Invoke-ShowActionProgress function.

If there are any questions contact me here or @matbe on twitter. Feel free to edit any of the "Actiontexts" presented to the user.

NickolajA commented 4 years ago

I love this. I'd like however to go over the code and make a few changes, as you have a different naming standard for variables etc than what we've in the script currently. Would that be alright?

matbe commented 4 years ago

Most variables are from the showactionprogress method to keep it consistent with the MS documentation.

https://docs.microsoft.com/en-us/mem/configmgr/develop/reference/core/clients/client-classes/iprogressui--showactionprogress-method

But feel free to change what you see fit. Also a bit more testing wouldnt hurt :) It works for me in my lab (latest TP) and on ConfigMgr 2002, if anyone could verify on an older build that might be good. (Should work though)