从命令行运行 PowerShell

从命令行运行 PowerShell 命令最精炼的代码:

@powershell -nop -ex unrestricted -c "Get-ChildItem"

最后一个参数可以换成别的命令。另外,从命令行运行 .ps1 脚本的方式是:

@powershell -nop -ex unrestricted .\something.ps1
作者

Victor Woo

发布于

2014-08-03

更新于

2014-08-03

许可协议

PowerShell 技术 QQ 群