PrivateFunctions/Validate-Version.ps1
Function Validate-Version { [OutputType([Bool])] [CmdletBinding()] Param( [Parameter(Mandatory=$True)] [ValidateNotNull()] [System.Version] $Version ) # This module supports version 1.8, 1.9, 2.0, 2.1 for now. If ($Version.Major -eq 1 -and ($Version.Minor -eq 8 -or $Version.Minor -eq 9)) { Return $True } If ($Version.Major -eq 2 -and ($Version.Minor -eq 0 -or $Version.Minor -eq 1)) { Return $True } Return $False } |