Open
Description
Command proposal
A command that return package information from an installed package using Get-Package
or Get-Item
to get file executable information for a not yet installed package.
Proposed parameters
Two parameters sets, Package
and FilePath
Parameter Set | Parameter | Mandatory | Data type | Description | Default value | Allowed values |
---|---|---|---|---|---|---|
PackageSet | Package | Yes | String | Specifies if either the Reporting Servives or Power BI Report Server package should be retrieved | None | SSRS, PBIRS |
FilePathSet | FilePath | Yes | String | Specifies the executable | None | None |
Special considerations or limitations
Might use this example code to get file executable information:
<#
.SYNOPSIS
Gets the product version of a executable.
.PARAMETER Path
The path to the executable to return product version for.
.OUTPUTS
Returns the product version as [System.Version] type.
#>
function Get-FileProductVersion
{
[CmdletBinding()]
[OutputType([System.Version])]
param
(
[Parameter(Mandatory = $true)]
[System.String]
$Path
)
return [System.Version] (Get-Item -Path $Path).VersionInfo.ProductVersion
}