指示验证的最佳 Powershell 动词?

Best Powershell verb to indicate Validation?

我经常有一个验证特定值的方法。在 powershell 中,惯例是使用 'get-verb' 列表中的动词,但我不知道哪个最适合这种用法。

或者,如果我的设计架构应该改变以避免以某种其他方式通过方法进行验证,我也欢迎沿着这条线提出建议。

大致相关的动词有:Ensure、Compare、Edit、Convert、Initialize、Update、Assert、Confirm、Measure、Resolve、Test、Write、Grant、Use。

验证值的适当动词是Test。引用 Approved Verbs 列表(第 诊断动词 部分):

Verb (alias)   Action                       Comments
...            ...                          ...
Test (t)       Verifies the operation or    For this action, do not use verbs
               consistency of a resource.   such as Diagnose, Analyze, Salvage,
                                            or Verify.