Skip to content

Instantly share code, notes, and snippets.

@pkutaj
Last active October 14, 2021 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkutaj/f22e97523245c86fff744afc98b7dd32 to your computer and use it in GitHub Desktop.
Save pkutaj/f22e97523245c86fff744afc98b7dd32 to your computer and use it in GitHub Desktop.
File Count per Folder in Powershell (not recursive)
Get-ChildItem -Recurse -Directory |
Select-Object Name, @{
Name="FileCount";
Expression={(Get-ChildItem $_ -File | Measure-Object).Count }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment