Multiple choice technology

Which command is used to explain what will happen if the command is executed, without actually executing the command?

  1. -WhatIf

  2. -WhatIIf

  3. -WhatHappens

  4. All of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The -WhatIf common parameter (or switch) in PowerShell is used to preview what a command would do without actually executing it. This is particularly useful for destructive operations like Remove-Item or Stop-Service to see the impact before making changes. Options B and C are not valid PowerShell parameters.