Post

Since Set-MicrophoneAccess has a High confirmation level, which is fine, you should include a -Force parameter to apply the setting without the confirmation. Otherwise, I can never use this in any type of automation.

With high confirmation level, I'd use `-Confirm:$true` or `-Confirm:1` when used in automation, in preference to adding a `-Force` parameter. Which is the idiomatic powershell?

Don't force the user to run Set-MicrophoneAccess disable -confirm:$false The syntax should be Set-MicrophoneAccess Disable -Force Setting a false value on a switch parameter is ugly and not something a beginner would understand. But they should understand -Force esp. with help documentation

There's also always the Enable / Disable verbs. They feel like a natural fit here. I personally would write them as calls to Set.

1 repost1 like