最佳Powershell动词表示验证?

Ann*_*ile 5 powershell naming-conventions

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

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

大致相关的动词有:确保,比较,编辑,转换,初始化,更新,断言,确认,测量,解析,测试,写入,授予,使用.

Ans*_*ers 11

用于验证值的适当动词是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.