Tested

# 1. Set your paths
$sourceFolder = "C:\Your\Folder\Path" # <--- CHANGE THIS
$csvOutput = "$env:USERPROFILE\Desktop\Full_Metadata_Export.csv"
$shell = New-Object -ComObject Shell.Application
$folder = $shell.Namespace($sourceFolder)
$allResults = @()
# Get all files
$files = Get-ChildItem -Path $sourceFolder -File
foreach ($file in $files) {
$shellFile = $folder.ParseName($file.Name)
# Start with basic File System & Version Info (This catches "Program description")
$properties = [ordered]@{
"FileName" = $file.Name
"ProgramDescription" = $file.VersionInfo.FileDescription
"ProductVersion" = $file.VersionInfo.ProductVersion
"Full_Path" = $file.FullName
}
# Now loop through all 320+ Windows Shell Property Slots (Title, Authors, etc.)
for ($i = 0; $i -lt 321; $i++) {
$name = $folder.GetDetailsOf($null, $i)
if ($name) {
$value = $folder.GetDetailsOf($shellFile, $i)
# We only add the column if it's not already there and has a value
if (-not $properties.Contains($name) -and ![string]::IsNullOrWhiteSpace($value)) {
$properties[$name] = $value
}
}
}
$allResults += New-Object PSObject -Property $properties
}
# 2. Export to CSV
$allResults | Export-Csv -Path $csvOutput -NoTypeInformation -Encoding utf8
Write-Host "Done! Exported to $csvOutput" -ForegroundColor Green