IE Automation with Powershell

后端 未结 3 2038
悲哀的现实
悲哀的现实 2021-01-13 20:19

I am attempting to automate the login to website on our intranet using Powershell and IE. So far, I have the following code that works:

$ie = new-object -co         


        
3条回答
  •  旧时难觅i
    2021-01-13 21:00

    Try this.

    1. $shell = (New-Object -ComObject Shell.Application).Windows()
    2. $shell.Count
    3. 7
    4. you have items 0-6 you can check this way.
    5. $shell.Item(0).LocationName
    6. or
    7. $shell.Item(0).LocationURL
    8. $shell.Item(1).LocationName
    9. $shell.Item(1).LocationURL

提交回复
热议问题