这个 Powershell 语法的名称是什么?

What is the name of this Powershell syntax?

让我们以这个查询为例:

Get-ADGroup $group -Properties Name | Select-Object Name

我不记得 Powershell 中通过括号获取属性的以下语法的名称,我猜是从 v2 开始的。

(Get-ADGroup $group -Properties Name).Name

你是说 Dot notation\Dotted notation 吗?那就是访问对象中的属性的"process"。

圆括号是c#/.Net的一种技术,用于指定一行代码运行的顺序,但我不确定正式名称是什么。 Expression operator() operator 我猜。

You can use enclosures, such as parentheses, to override the standard precedence order and force Windows PowerShell to evaluate the enclosed part of an expression before an unenclosed part.

来源:about_Operator_Precedence

它叫做子表达式。

Use a subexpression to return specific properties of an object.

this page on ss64.com

点符号或点源是指在路径前添加一个点以执行在同一文件夹中找到的脚本。例如,如果您想要 运行 MyScript.ps1 并且它在您的当前目录中找到,您不能只键入 MyScript.ps1。 PowerShell 的安全策略要求您指定完整路径,或使用完整路径快捷方式:

.\MyScript.ps1

原来我错了:

根据 PowerShell 的首席开发人员 Bruce Payette 在他的书《PowerShell 实战》(第 5 章高级运算符和变量,第 132 页)中所说,'.' PowerShell 中的字符 是“属性 取消引用运算符 ”。

他也称它为点运算符,所以它似乎没有除 'property dereference operator' 之外的特殊名称。

我以前从未听过这个短语,但在进行了所有这些对话之后我决定我必须知道。