1 Reply Latest reply on Feb 12, 2019 11:45 AM by Patrick A Van Der Hyde

    How to login to a Tableau server website using Powershell?

    Alex Maydaun

      I'm trying to use simple script to autologon to our Tableau Server website:

       

      $ie = New-Object -ComObject 'internetExplorer.Application'

      $ie.Visible= $true

      $username="test"

      $password="password"

      $ie.Navigate("http://FQDN/#/site/board/views/_3/sheet0")

       

      While ($ie.Busy -eq $true) {Start-Sleep -Seconds 3;}

       

      $usernamefield = $ie.Document.documentElement.getElementsByClassName("tb-text-box-input") | ?{$_.name -eq 'username'}

      $usernamefield.value = "$username"

       

      $passwordfield = $ie.Document.documentElement.getElementsByClassName("tb-text-box-input") | ?{$_.name -eq 'password'}

      $passwordfield.value = "$password"

       

      $button = $ie.Document.documentElement.getElementsByClassName("tb-orange-button") | ?{$_.type -eq 'submit'}

      $button.Click();

       

      But webpage still telling me to enter username.

       

       

      tbs.jpg

      How can I pass values to input fileds using right method?