展开 modules 属性的详细信息

get-process |? {$_.processname -eq "cmd"}|select -ExpandProperty modules

Select-Object用法

 

不显示某个属性,当参数中也包括 -property 时,-excludeproperty 才有效

get-process |? {$_.processname -eq "cmd"}|select -property id,processname -ExcludeProperty id

Select-Object用法

"a","b","c","a","a","a" | select-object -unique #选择唯一值,去掉重复值

 

get-content servers.txt | select-object -skip 1 #跳过第一个

 

get-process | select-object -property ProcessName,@{Name="Start Day"; Expression = {$_.StartTime.DayOfWeek}} #构造Hash表

相关文章:

  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
  • 2021-12-01
  • 2021-05-17
  • 2021-07-29
猜你喜欢
  • 2021-05-29
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2021-12-23
相关资源
相似解决方案