Get-ChildItem in PowerShell
One of the Cmdlets on PowerShell is Get-ChildItem. This command is used to get the items and child items in one or more specified locations. It provides functionality similar to dir command in Windows’ command.
Most of the time, Get-ChildItem will return a list of items that you want to collect, for example, a list of files in a specific folder, etc. When you have a list, usually you want to know how many items are in the list. In PowerShell, this can be achieved by accessing the Count property of the list.