Advertisement
Guest User

Untitled

a guest
Jul 1st, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Visted Domains Comments
  2. yahoo.com
  3. google.com
  4. hotmail.com
  5.  
  6. $ExcelObject = New-Object -comobject Excel.Application
  7. $ExcelObject.Visible = $true
  8. $ExcelObject.DisplayAlerts = $False
  9.  
  10. $excelFile = "C:UsersmuafzalDocumentsFilesEMIEAnalyzinglist.xlsx"
  11.  
  12. $Workbook = $ExcelObject.workbooks.open($excelFile)
  13. $Sheet = $Workbook.Worksheets.Item(1)
  14.  
  15. $row = [int]2
  16. $domain = @() # beginnt bei 2,1... 3,1... 4,1
  17. Do {
  18. $domain += $Sheet.Cells.Item($row,2).Text ; $row = $row + [int]1
  19. } until (!$Sheet.Cells.Item($row,1).Text)
  20.  
  21. ForEach($url in $domain){
  22. #Start IE and make it visible
  23. $ie = new-object -com "InternetExplorer.Application"
  24. $ie.Visible = $true
  25.  
  26. #Navigate to the URL
  27. $ie.Navigate($url)
  28.  
  29. # Output URL that have been visited to a text file.
  30. $url | Out-File $done -Append
  31.  
  32. #Sleep while IE is running
  33. while($ie.visible){
  34. start-sleep -s 1
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement