Untitled
unknown
plain_text
15 days ago
827 B
1
Indexable
Never
# Specify the path to the directory containing the .dll files $directoryPath = "C:\temp\bin\test\" # Get only .dll files with names starting with "dnn." or "DotNetNuke." $dllFiles = Get-ChildItem -Path $directoryPath -Filter *.dll | Where-Object { $_.Name -match '^(dnn\.|DotNetNuke\.)' } # Iterate through each selected .dll file and print its version information foreach ($dllFile in $dllFiles) { try { # Load the assembly $assembly = [System.Reflection.Assembly]::ReflectionOnlyLoadFrom($dllFile.FullName) # Get the version information $version = $assembly.GetName().Version # Print the version information Write-Host "$($dllFile.Name) Version: $($version.ToString())" } catch { Write-Host "Error loading $($dllFile.Name): $_" } }
Leave a Comment