Skip to content

ConvertTo-PSSemVer

SYNOPSIS

Converts a version string to a PSSemVer object.

SYNTAX

ConvertTo-PSSemVer [-Version] <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This function takes a version string and converts it to a PSSemVer object.

EXAMPLES

EXAMPLE 1

'1.2.3-alpha.1+001' | ConvertTo-SemVer

Major : 1 Minor : 2 Patch : 3 Prerelease : alpha.1 BuildMetadata : 001

PARAMETERS

-Version

The version to convert.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

PSSemVer

NOTES

Compatible with SemVer 2.0.0.