$MyInvocation

$MyInvocation.MyCommand.Path------->path and file name of the current script.

$MyInvocation.MyCommand.Name----->the name of a function to identity the current command.

$MyInvocation.MyCommand.Definition-->the complete path of the current script.

posted @ 2013-05-07 15:52  daishuguang  阅读(623)  评论(0编辑  收藏  举报