Thanks!
"Ben" <B...@discussions.microsoft.com> wrote in message
news:2DF1594D-CDF6-4A43...@microsoft.com...
have a look at $MyInvocation variable (ScriptName).
Martin
"Ben" <B...@discussions.microsoft.com> wrote in message
news:2DF1594D-CDF6-4A43...@microsoft.com...
>
1..5 | foreach {"do stuff"}
"Script Name = $($MyInvocation.MyCommand.Name)"
"Script Path = $($MyInvocation.MyCommand.Definition)"
--
Richard Siddaway
All scripts are supplied "as is" and with no warranty
PowerShell MVP
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk
The first token of the last entered string. Not a solution. Sorry.