Add support for -WhatIf and -Confirm.