为什么Get-Verb没有返回Description
时间: 2023-07-05 20:11:26 浏览: 133
在PowerShell中,`Get-Verb`命令返回的动词列表中包含了每个动词的`Group`、`Verb`和`Description`属性。如果您没有看到`Description`属性,可能是因为您在使用`Get-Verb`命令时没有指定要获取的动词。例如,如果您想获取`Get-Verb`命令的描述,可以使用以下命令:
```powershell
(Get-Verb -Verb Get).Description
```
这将返回`Get-Verb`命令的描述,即“获取对象的值或属性”。
相关问题
Get-Verb 如何返回Description
在 PowerShell中,可以使用以下命令获取`Get-Verb`的`Description`:
```powershell
(Get-Verb -Verb Get).Description
```
这将返回一个字符串,其中包含`Get-Verb`命令的`Description`。`Get-Verb`命令用于获取可用于PowerShell命令的常见动词列表。
(Get-Verb -Verb Get).Description没有返回
如果您使用的是Windows PowerShell 2.0版本,`Get-Verb`命令返回的动词列表中不包含`Description`属性。`Description`属性是在PowerShell 3.0版本中引入的。
如果您使用的是Windows PowerShell 3.0及更高版本,但仍然无法获取`Get-Verb`命令的`Description`属性,可能是因为该属性尚未本地化。在这种情况下,您可以尝试使用下面的命令获取`Get-Verb`命令的`Description`属性:
```powershell
(Get-Verb -Verb Get).Description.Resource.Value
```
如果您仍然无法获取`Description`属性,请尝试升级到最新版本的PowerShell或联系Microsoft支持寻求帮助。