$dirs = @(
"C:\Siemens\NX\NXBIN",
"C:\Siemens\NX\STEP214UG"
)
foreach ($dir in $dirs) {
"`n===== $dir ====="
Get-ChildItem $dir -File -ErrorAction SilentlyContinue |
Where-Object Name -Match '^lib(ap214|part|pman)\.dll$' |
ForEach-Object {
[PSCustomObject]@{
Name = $_.Name
Path = $_.FullName
Version = $_.VersionInfo.FileVersion
Size = $_.Length
}
} | Format-Table -AutoSize
}