Update-List
: Pointless invocations without update arguments aren't prevented.
#20987
Open
5 tasks done
Labels
Needs-Triage
The issue is new and needs to be triaged by a work group.
WG-Cmdlets-Utility
cmdlets in the Microsoft.PowerShell.Utility module
Prerequisites
Steps to reproduce
Update-List
only makes senses with:-Add
and/or-Remove
-Replace
Not specifying any of these parameters is pointless (effectively a no-op) and should therefore be prevented.
Expected behavior
An error should be reported.
Note:
-Add
and-Remove
are both non-mandatory, given that neither is conceptually mandatory on its own.The concept of requiring at least one from a group of related parameters to be bound cannot currently expressed in a declarative manner.
Actual behavior
The input objects are quietly passed through as-is (a no-op).
Error details
No response
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: