PoshCode Archive  Artifact [ba14edd77d]

Artifact ba14edd77df8061969490513fcade290532c7e724e884d7ec5512d7b6d10b5bf:

  • File Get-PSVersion.ps1 — part of check-in [9e49d76a35] at 2018-06-10 13:40:33 on branch trunk — Simple Function to get powershell version (user: Powershell Jedi size: 571)

# encoding: ascii
# api: powershell
# title: Get-PSVersion
# description: Simple Function to get powershell version
# version: 0.1
# type: function
# author: Powershell Jedi
# license: CC0
# function: Get-PSVersion
# x-poshcode-id: 4413
# x-derived-from-id: 4415
# x-archived: 2015-03-03T16:19:44
# x-published: 2015-08-21T17:40:00
#
#
Set-Alias Ver Get-PSVersion
function Get-PSVersion
{
[string]$Major = ($PSVersionTable).PSVersion.Major
[string]$Minor = ($PSVersionTable).PSVersion.Minor
[string]$Out = $Major + '.' + $Minor
Write-Output $Out
}