Get All Files with a Certain Extension
# add '-recurse' to include sub folders Get-ChildItem -Path $directory -Filter "*.CSV"
Get All Folders in a Directory
# add '-recurse' to include sub folders Get-ChildItem -Path $directory -Directory
Get All Files in a Directory
# add '-recurse' to include sub folders Get-ChildItem -Path $directory -File
Get All Files and Folders in a Directory
# add '-recurse' to include sub folders Get-ChildItem -Path $directory