The meaning of the SUSPEND option

Every time you have to confirm an action, through the natively implemented ShouldProcess method, you get five options:
– Yes
– Yes to All
– No
– No to All
– and a mysterious “Suspend” option

yes no to all suspend

When you select Suspend, you come back to the command line with a double arrow.
This means you have suspended the action at the point of the confirmation and you can resume it later again.

Suspended state

If you type exit, the confirmation resumes as well as all actions behind the point where the command has been suspended.

Interestingly, you can cumulate multiple confirmations and for every new one, you will see a new arrow added to the existing ones.

multiple nested confirmation

Meanwhile, you can type any command and the suspended ones are kept in memory … as long as you don’t close the console!

suspended state kept in memory

More about

ShouldProcess method (MSDN)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s