cmd命令调用powershell脚本方法

mac2022-06-30  89

cmd方法:

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

ps1脚本代码:

function WriteInfo { Param($param); Write-Host $param; }

 

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

转载于:https://www.cnblogs.com/mermaidLoft/p/5959460.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)