powershell script to get list of file types
- Sean O'Shea
- Mar 12
- 1 min read
You can use this PowerShell script to generate a list of each file extension on a C drive.
Get-ChildItem -Path C:\ -Recurse -File | Select-Object Extension -Unique | Sort-Object Extension

As always I’ve tested this method and confirmed that it works. It should take 10 to 20 minutes depending on the size of the hard drive.