小编Lau*_*ura的帖子

在Powershell中,-Property和-ExpandProperty有什么区别?

运行 cmdlet 时,输出略有不同,我只是想了解这两个 cmdlet 之间的区别以及为什么要使用其中一个而不是另一个。

例子:

Get-Date | Select -Property DayOfWeek
Run Code Online (Sandbox Code Playgroud)

输出:

DayOfWeek
---------
Saturday
Run Code Online (Sandbox Code Playgroud)


Get-Date | Select -ExpandProperty DayOfWeek

Saturday
Run Code Online (Sandbox Code Playgroud)

powershell command-line powershell-ise

7
推荐指数
1
解决办法
4868
查看次数

标签 统计

command-line ×1

powershell ×1

powershell-ise ×1