Powershell Tip #81: Count files and folders By powershellgu | November 30, 2015 2 Comments Tip: You can count the files and folders : PowerShell # Count Files ((Get-ChildItem -Path 'C:\demo' -Recurse -File | Measure-Object)).Count # Count Folders ((Get-ChildItem -Path 'C:\demo' -Recurse -Directory | Measure-Object)).Count 12345 # Count Files((Get-ChildItem -Path 'C:\demo' -Recurse -File | Measure-Object)).Count # Count Folders((Get-ChildItem -Path 'C:\demo' -Recurse -Directory | Measure-Object)).Count Note: The parameters -File and -Directory require PowerShell v3.
Pingback: Powershell Tip #82: List the order of network protocol bindings | Powershell Guru
Pingback: Powershell Tip #80: Find MAC address on a remote computer - Powershell Guru