Confirm, WhatIf, and Force

The Confirm, WhatIf, and Force parameters are used with commands that make changes (to files, variables, data, and so on). These parameters are often used with commands that use the verbs Set or Remove, but the parameters are not limited to specific verbs.

Confirm and WhatIf have associated preference variables. Preference variables have an about file, which may be viewed using the following command:

Get-Help about_Preference_Variables 

The Force parameter is not one of the common parameters, but it is often seen in commands which might otherwise prompt for confirmation. There is no fixed use of the Force parameter. The effect of using Force is a choice a command developer must make. The Help documentation should state the effect of using Force, as is the case with the Remove-Item command in the following example:

Get-Help Remove-Item -Parameter Force  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.213.212