1: gc ($myinvocation.MyCommand.path) | Measure -Character| select characters |fl
I'm using the built in variable $myinvocation to get the whole path to the script and piping it to the measure-object cmdlet to get the count of Characters then passing that to the select cmdlet then finally to format-list.
No comments:
Post a Comment