Windows 执行powershell脚本时出现警告
这是我在本SE中提出的问题的继续。我已使用powershell执行此命令Windows 执行powershell脚本时出现警告,windows,powershell,Windows,Powershell,这是我在本SE中提出的问题的继续。我已使用powershell执行此命令 $query = "SELECT * FROM Win32_DeviceChangeEvent WHERE EventType = 2" Register-WMIEvent -Query $query -Action { invoke-item "C:\Program Files\abc.exe"} 我已成功执行powersell脚本,但收到此警告。 您能否告诉我如何更正此问题将命令导入格式列表或尝试格式表-自动: R
$query = "SELECT * FROM Win32_DeviceChangeEvent WHERE EventType = 2"
Register-WMIEvent -Query $query -Action { invoke-item "C:\Program Files\abc.exe"}
我已成功执行powersell脚本,但收到此警告。
您能否告诉我如何更正此问题将命令导入
格式列表
或尝试格式表-自动
:
Register-WMIEvent -Query $query -Action { invoke-item "C:\Program Files\abc.exe"} | Format-List
或
您是否已尝试显式声明要显示的列?两个查询均无效作业状态为“未启动”。您还可以尝试将控制台的大小调整为120个字符宽。:-)我非常抱歉,但我是powershell的新手,我无法通过调整控制台的大小来理解?使用上面的脚本,我收到了这个消息
Register-WMIEvent -Query $query -Action { invoke-item "C:\Program Files\abc.exe"} | Format-Table -Auto