Waiting in PowerShell for an action to complete

If you want PowerShell to wait for an action to complete, you can display a loading spinner using these few lines of code.

The script will print a new dot every three seconds until the condition in the until-clause is fulfilled.

The result looks like this:

Leave a Reply

Your email address will not be published. Required fields are marked *