PoshCode Archive  Artifact [205a8ce89e]

Artifact 205a8ce89e80f92b6989d777f64efffdcbb55e549c161420135e79362b3dba9e:

  • File Get-PSVersion.ps1 — part of check-in [c98cda048b] at 2018-06-10 14:27:23 on branch trunk — Simple Function to get powershell version (user: Powershell Jedi size: 543)

# 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: 959
# x-archived: 2015-05-04T21:54:48
# x-published: 2009-03-17T05:35: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
}