在powershell中实例化chrome对象 [英] instantiate chrome object in powershell
本文介绍了在powershell中实例化chrome对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个powershell脚本,在IE中运行得很好,但我需要在Chrome中使用它。
$ ie = new-object -comInternetExplorer.Application
适用于IE。
如何实例化Chrome浏览器?
I have a powershell script which works just fine in IE however I need to also have it work in Chrome. $ie = new-object -com "InternetExplorer.Application" Works fine for IE. How do I instantiate the Chrome browser?
推荐答案
您可以通过名称启动进程并将其传递给参数,如下所示:
You can start a process by name and even pass it a parameter, like this:
Start-Process "chrome.exe" "www.google.com"
这篇关于在powershell中实例化chrome对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文