How to Validate Parameter Input
This section contains examples that show how to validate parameter input by using various attributes to implement validation rules.
In This Section
How to Validate an Argument with a Script Describes how to validate an argument set by using the ArgumentSet attribute.
How to Validate an Argument Set Describes how to validate an argument set by using the ArgumentSet attribute.
How to Validate an Argument Range Describes how to validate an argument range by using the ArgumentRange attribute.
How to Validate an Argument Pattern Describes how to validate an argument pattern by using the ArgumentPattern attribute.
How to Validate the Argument Length Describes how to validate the length of an argument by using the ArgumentLength attribute.
How to Validate an Argument Count Describes how to validate an argument count by using the ArgumentCount attribute.
The way a parameter is declared can affect validation. For more information, see How to Declare Cmdlet Parameters.
Reference
See Also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應