I have a script, test.ps1, shown below. But I would like to be able to run: .\test.ps1 -version and have it return the current version of the script to me.
Is there a way to do this?
<#
.SYNOPSIS
Test
.DESCRIPTION
Desc
.INPUTS
None
.OUTPUTS
None
.NOTES
Author : me
Version : 1.0
Purpose : PowerShell script test
#>
This did not work.