How to count objects in PowerShell?

后端 未结 5 2176
星月不相逢
星月不相逢 2020-12-07 14:17

As I\'m reading in the PowerShell user guide, one of the core PowerShell concepts is that commands accept and return objects instead of text. So for example, runnin

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 15:02

    Just use parenthesis and 'count'. This applies to Powershell v3

    (get-alias).count
    

提交回复
热议问题