Imagine you are feeling handy and start out to rebuild your bathroom. Now imagine you’re standing knee deep in water in your basement. I bet you wished that somewhere in your head there was a tiny voice which had asked you, “do you really want to drill there”? This is the purpose of the PowerShell -Confirm parameter. If you’re running a cmdlet which changes the system state you can use -Confirm in order to get a question asking you if you really want to go ahead with the change.
Argh, my files, my precious files!
We’ve all heard horror stories of format c: and the like. At one point you might even have deleted files by mistake. With the Remove-Item cmdlet you can do just that.
However wouldn’t this have been better:
As the carpenters say; measure twice, cut once. Sometimes it’s better to step carefully unless you are really sure of what you are doing. The -Confirm parameter can be that little voice inside your head.