< Back

Get-Metadata

Sun Jan 12, 2020 6:42 pm

NAME Get-Metadata



SYNOPSIS

Reads a specific value from a PowerShell metdata file (e.g. a module manifest)





SYNTAX

Get-Metadata [[-Path] <String>] [[-PropertyName] <String>] [-Passthru] [<CommonParameters>]





DESCRIPTION

By default Get-Metadata gets the ModuleVersion, but it can read any key in the metadata file





PARAMETERS

-Path <String>

The path to the module manifest file



Required? false

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-PropertyName <String>

The property (or dotted property path) to be read from the manifest.

Get-Metadata searches the Manifest root properties, and also the nested hashtable properties.



Required? false

Position? 2

Default value ModuleVersion

Accept pipeline input? false

Accept wildcard characters? false



-Passthru [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

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



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



PS C:\\>Get-Metadata .\\Configuration.psd1



Returns the module version number (as a string)









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



PS C:\\>Get-Metadata .\\Configuration.psd1 ReleaseNotes



Returns the release notes!











RELATED LINKS