count how many files are in a directory powershell?
If you want to count only the folders inside your parent folder, run this command: (Get-ChildItem -Directory | Measure-Object). Count. If you want to count only the files in the folder, run this command: (Get-ChildItem -File | Measure-Object). Count.