Skip to content

Add Write-Progess to display the script is actively working#1179

Merged
dpaulson45 merged 4 commits into
mainfrom
dpaul-WriteProgress
Aug 18, 2022
Merged

Add Write-Progess to display the script is actively working#1179
dpaulson45 merged 4 commits into
mainfrom
dpaul-WriteProgress

Conversation

@dpaulson45
Copy link
Copy Markdown
Member

Issue:
The script at times will stop displaying things to screen but is actively working.

Fix:
Use Write-Progress to show that the script is still working and doing things when we don't display everything to the host.

Validation:
Lab tested

image

@dpaulson45 dpaulson45 requested a review from a team as a code owner August 18, 2022 02:33
Copy link
Copy Markdown
Member

@bill-long bill-long left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have two progress bars, and the second one is child progress of the first, we should give the first one an Id and then specify it as the ParentId on the child.

@bill-long
Copy link
Copy Markdown
Member

Have we considered doing something like this so it shows progress during the long operation:

image

@dpaulson45
Copy link
Copy Markdown
Member Author

Have we considered doing something like this so it shows progress during the long operation:

image

Hmmm... let me try something

@dpaulson45
Copy link
Copy Markdown
Member Author

Since we have two progress bars, and the second one is child progress of the first, we should give the first one an Id and then specify it as the ParentId on the child.

Done.

image

@bill-long
Copy link
Copy Markdown
Member

Hmmm... let me try something

If the foreach emits the objects you can still have the same statement collect the results:

image

@dpaulson45
Copy link
Copy Markdown
Member Author

dpaulson45 commented Aug 18, 2022

Hmmm... let me try something

If the foreach emits the objects you can still have the same statement collect the results:

image

got it to look like this:

image

What I am not sure about is the Total Count and what we should be basing that off of, I made an educated guess and assumed that by default Get-OutlookAnywhere is only going to collect information from the Front End Virtual Directory and not try to query the Mailbox Servers, unless -ShowMailboxVirtualDirectories is being used.

@dpaulson45 dpaulson45 force-pushed the dpaul-WriteProgress branch from 9b14e8f to eef0048 Compare August 18, 2022 14:05
@dpaulson45 dpaulson45 merged commit b094bc9 into main Aug 18, 2022
@dpaulson45 dpaulson45 deleted the dpaul-WriteProgress branch August 18, 2022 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants