PrivateFunctions/Validate-Version.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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 } |