Update list-cli-tools.ps1

This commit is contained in:
Markus Fleschutz 2022-09-05 19:45:54 +02:00
parent b6317944c0
commit 53d44cc2dd

View File

@ -1,8 +1,8 @@
<# <#
.SYNOPSIS .SYNOPSIS
Lists available CLI tools Lists installed CLI tools
.DESCRIPTION .DESCRIPTION
This PowerShell script lists available command-line interface (CLI) tools. This PowerShell script lists installed command-line interface (CLI) tools.
.EXAMPLE .EXAMPLE
PS> ./list-cli-tools PS> ./list-cli-tools
@ -37,12 +37,12 @@ function CheckFor { param([string]$Cmd, [string]$VersionArg)
} else { } else {
$Version = $Info.Version $Version = $Info.Version
} }
if (test-path "$Location" -pathType leaf) { if (Test-Path "$Location" -pathType leaf) {
$FileSize = (Get-Item "$Location").Length $FileSize = (Get-Item "$Location").Length
} else { } else {
$FileSize = "0" $FileSize = "0"
} }
new-object PSObject -Property @{ Name=$Cmd; Version=$Version; Location=$Location; FileSize=$FileSize } New-Object PSObject -Property @{ Name=$Cmd; Version=$Version; Location=$Location; FileSize=$FileSize }
} catch { } catch {
return return
} }
@ -82,7 +82,9 @@ function ListTools {
CheckFor diff "--version" CheckFor diff "--version"
CheckFor dism "" CheckFor dism ""
CheckFor driverquery "" CheckFor driverquery ""
CheckFor egrep "--version"
CheckFor find "--version" CheckFor find "--version"
CheckFor fgrep "--version"
CheckFor ftp "--version" CheckFor ftp "--version"
CheckFor gcc "--version" CheckFor gcc "--version"
CheckFor gdb "--version" CheckFor gdb "--version"