cmd方法:

powershell -command ". ('ps1脚本路径'); WriteInfo  -param 'param参数值'"

ps1脚本代码:

function WriteInfo
{

  Param($param);

  Write-Host $param;

}

 

其中,. ('ps1脚本路径');“.”后面带有一个空格。

相关文章:

  • 2022-12-23
  • 2021-08-06
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2021-12-04
猜你喜欢
  • 2022-12-23
  • 2021-11-04
  • 2021-12-20
  • 2021-10-08
  • 2020-10-19
  • 2021-12-16
  • 2022-12-23
相关资源
相似解决方案