Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在批处理文件中运行powershell CheckNetIsolation命令_Powershell_Command Line - Fatal编程技术网

如何在批处理文件中运行powershell CheckNetIsolation命令

如何在批处理文件中运行powershell CheckNetIsolation命令,powershell,command-line,Powershell,Command Line,我需要从命令行运行中提到的以下Powershell命令: CheckNetIsolation LoopbackExempt -a -n="microsoft.win32webviewhost_cw5n1h2txyewy" 虽然它在PowerShell上工作,但在命令行上不工作。这是我尝试过的命令: powershell.exe -command "& {CheckNetIsolation LoopbackExempt -a -n=microsoft.win32webviewhost_c

我需要从命令行运行中提到的以下Powershell命令:

CheckNetIsolation LoopbackExempt -a -n="microsoft.win32webviewhost_cw5n1h2txyewy"
虽然它在PowerShell上工作,但在命令行上不工作。这是我尝试过的命令:

powershell.exe -command "& {CheckNetIsolation LoopbackExempt -a -n=microsoft.win32webviewhost_cw5n1h2txyewy}"

有人能帮忙吗?

链接中提到的powershell命令不是特定于powershell的命令。只要DOS box以管理员身份运行,它就可以在常规DOS命令行上运行