Parameter binding fails
Documentation: Microsoft Learn
Work the problem
The parameter is present, but incompatible
Fictional case: A command works with either of two parameter combinations. Combining both produces a parameter-set error.
Reasoning notebook
Record the evidence that supports your answer and the check you would run next. Your notes stay in this browser — nothing is uploaded.
Why it happens
PowerShell decides which parameter set applies before executing anything, and a combination spanning two mutually exclusive sets is unresolvable however sensible it reads. Type conversion is the other frequent failure, where a value is handed to a parameter expecting a different type and no coercion exists. Passing an array where a single item is expected fails the same way.
Check this first
What to look for
Parameters can exist individually but not belong to the same set. Start with a valid minimal call and add arguments deliberately.
Working through it
- Run Get-Command $Command -Syntax and find which single set contains every parameter you supplied.
- Read the parameter's declared type in Get-Help $Command -Full and compare it against what the variable holds.
- Check the variable with GetType() rather than trusting the way it prints.
- Remove parameters one at a time until binding succeeds, which identifies the conflicting pair.
- Cast the value explicitly, or wrap a single item in @() when the parameter expects a collection.
Avoiding it next time
Verify the repair: Confirm the intended minimal call binds, then reintroduce optional parameters one at a time.