Home Dashboard Directory Help
Search

Add a .version to comment-based help, that can also be called from script by are bee en zed


Status: 

Active


10
1
Sign in
to vote
Type: Suggestion
ID: 841437
Opened: 3/26/2014 4:05:10 PM
Access Restriction: Public
0
Workaround(s)
view

Description

I'd love to be have a .version added through comment based help on scripts and functions. This would be especially valuable if it was visible from within the script or function itself as well, perhaps as a member of $MyInvocation or $PSCmdLet.

e.g.
# .Version 1.0.12 (March 26, 2014)

...

{
write-host "This is the FooBar script version $($MyInvocation.Version)!"
}

output on host:

This is the FooBar script version 1.0.12 (March 26, 2014)!
Details
Sign in to post a comment.
Sign in to post a workaround.