方法一: 

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

 

方法二:

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

.$script

 

相关文章:

  • 2021-09-04
  • 2022-02-16
  • 2021-12-27
  • 2021-07-20
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2021-11-30
猜你喜欢
  • 2022-12-23
  • 2021-05-25
  • 2021-09-28
  • 2021-09-12
  • 2021-11-26
相关资源
相似解决方案