当脚本执行完成后,可以删除自身
1 #删除脚本自身 2 remove-item $MyInvocation.MyCommand.Path -force
删除脚本自身
原文:http://www.cnblogs.com/dreamer-fish/p/4142327.html