Created
February 16, 2017 15:42
-
-
Save drasive/2064cc77bdb2c806d4fd45f385cb0686 to your computer and use it in GitHub Desktop.
Bulk .NET Assembly Version Checker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$directory = "TO_BE_SET" | |
$fileFilter = "TO_BE_SET" | |
$tableOrder = ` | |
@{ ` | |
Expression = {[System.Diagnostics.FileVersionInfo]::GetVersionInfo($_.FullName).ProductVersion.ToString()}; ` | |
Descending = $False}, ` | |
@{ ` | |
Expression = {$_.Name}; ` | |
Descending = $False} | |
$tableColumns = ` | |
@{ ` | |
Expression = {$_.Name}; ` | |
Label = "Assembly"; ` | |
width = 64}, ` | |
@{ ` | |
Label = "Product Version"; ` | |
Expression = {[System.Diagnostics.FileVersionInfo]::GetVersionInfo($_.FullName).ProductVersion.ToString()}; ` | |
width = 15}, ` | |
@{ ` | |
Label = "File Version"; ` | |
Expression = {[System.Diagnostics.FileVersionInfo]::GetVersionInfo($_.FullName).FileVersion.ToString()}; ` | |
width = 15} | |
Write-Host "Directory: $($directory)" | |
Write-Host "File filter: $($fileFilter)" | |
Get-ChildItem $directory -Filter $fileFilter ` | |
| Sort-Object -Property $tableOrder ` | |
| Format-Table $tableColumns | |
Write-Host "Press any key to continue ..." | |
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment