< Back

Get-CMsi

Sun Jan 12, 2020 9:44 pm

NAME Get-CMsi



SYNOPSIS

Gets details about an MSI file.





SYNTAX

Get-CMsi [-Path] <String[]> [<CommonParameters>]





DESCRIPTION

The `Get-CMsi` function reads the installer properties from an MSI file and returns a `Carbon.Msi.MsiInfo` object

representing an MSI's properties. `Carbon.Msi.MsiInfo` has properties for the following required MSI properties:



* ProductName

* ProductCode

* ProduceLanguage

* Manufacturer

* ProductVersion



All other properties are accessible via the `Properties` property, which is a hashtable of property name/value

pairs.



There is an additioanl `Path` property to capture the path of the MSI the properties came from.



`Get-CMsi` was introduced in Carbon 2.0.





PARAMETERS

-Path <String[]>

Path to the MSI file whose information to retrieve. Wildcards supported.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Carbon.Msi.MsiInfo





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-CMsi -Path MyCool.msi



Demonstrates how to read the properties from `MyCool.msi` file.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-ChildItem *.msi -Recurse | Get-CMsi



Demonstrates how you can pipe file info objects into `Get-CMsi`.











RELATED LINKS

https://msdn.microsoft.com/en-us/library/aa370905.aspx