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
PowerShell
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기