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