import console;
import process.popen;
console.showLoading(" 请稍候,正在调用 PowerShell");
var prcs = process.popen.ps(`-Command "& {Get-Command -Name *Process}"`);
var result = prcs.read(-1);
console.log(result);
console.pause();
也可以调用 .Net 然后调用 PowerShell :
import console;
import dotNet.ps;
console.showLoading(" 正在执行PowerShell命令");
console.log(dotNet.ps.command("Get-Command",{Name="*Process"}));
console.pause();