Powershell 脚本调用方法

方法一: 

Get-Content "D:\PowershellScripts\Test\ErrorMailNotice.ps1" | Invoke-Expression

 

方法二:

$script = "D:\PowershellScripts\Test\ErrorMailNotice.ps1"

.$script

 

posted @ 2017-07-05 14:37  寻香径  阅读(686)  评论(0编辑  收藏  举报