I would like to be able to get the file version and assembly version of all DLL files within a directory and all of its subdirectories. I'm new to programming, and I can't figure out how to make this loop work.
I have this PowerShell code to get the assembly version (taken from a forum):
$strPath = 'c:\ADMLibrary.dll'
$Assembly = [Reflection.Assembly]::Loadfile($strPath)
$AssemblyName = $Assembly.GetName()
$Assemblyversion = $AssemblyName.version
And this as well:
$file = Get-ChildItem -recurse | %{ $_.VersionInfo }
How can I make a loop out of this so that I can return the assembly version of all files within a directory?