<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VSphere Web - AutoIT in PAM Self-Hosted Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323488#M22425</link>
    <description>&lt;P&gt;@Nirmalkumar Dhanaraj​&amp;nbsp; thanks for the code,&lt;/P&gt;&lt;P&gt;we have  changed a custom code from for a VNC connector +  few codes from You.&lt;/P&gt;&lt;P&gt;our scenario, we allowed the exception of  unrecognized  ssl certification, and  add credentials. flash player is been allowed form registry .  &lt;/P&gt;&lt;P&gt;but when we add it to the account and test,  we getting a page to allow flash. right clicking  the middle of the page.&lt;/P&gt;&lt;P&gt;if we manually try it in PSM server we don't get it. flash player enabled and it's connecting smoothly .&lt;/P&gt;&lt;P&gt;have you experienced this before ?  have you able to add the Vsphere with flash ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0682J0000070hTLQAY.jpg"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/75894i476C4F044F978CEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0682J0000070hTLQAY.jpg" alt="0682J0000070hTLQAY.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2019 05:36:59 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2019-09-19T05:36:59Z</dc:date>
    <item>
      <title>VSphere Web - AutoIT</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323481#M22418</link>
      <description>&lt;P&gt;My customer is using VSphere Web (6.0) and its enabled with flash plugin.&lt;/P&gt;&lt;P&gt;prepared a  custom connector using AutoIT, its working in the local server but when deployed into PSM Server its not working as in the local server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any has some working code? or some help around this script would be much appreciated&lt;/P&gt;&lt;CODE&gt;#AutoIt3Wrapper_UseX64=n
&amp;nbsp;
Opt("MustDeclareVars", 1)
&amp;nbsp;
AutoItSetOption("WinTitleMatchMode",2) ; EXACT_MATCH!
&amp;nbsp;
&amp;nbsp;
;============================================================
;             PSM AutoIt Dispatcher Skeleton
;             ------------------------------
;
; Use this skeleton to create your own
; connection components integrated with the PSM.
; Areas you may want to modify are marked
; with the string "CHANGE_ME".
;
; Created : July  2018
; Kloud Solutions
;============================================================
#include "PSMGenericClientWrapper.au3"
;=======================================
; Consts &amp;amp; Globals
;=======================================
#include &amp;lt;PSMGenericClientWrapper.au3&amp;gt;
&amp;nbsp;
#include &amp;lt;GuiMenu.au3&amp;gt;
#include &amp;lt;IE.au3&amp;gt;
#include &amp;lt;Inet.au3&amp;gt;
&amp;nbsp;
Global $ConnectionClientPID = 0
&amp;nbsp;
Global Const $DISPATCHER_NAME									= "PSM-VMWareWeb-IE"
&amp;nbsp;
&amp;nbsp;
Global Const $CLIENT_EXECUTABLE	= "C:\Program Files\internet explorer\iexplore.exe" ; CHANGE_ME - Nirmal
&amp;nbsp;
Global Const $ERROR_MESSAGE_TITLE 	= "PSM " &amp;amp; $DISPATCHER_NAME &amp;amp; " Dispatcher error message"
&amp;nbsp;
Global Const $LOG_MESSAGE_PREFIX = $DISPATCHER_NAME &amp;amp; " Dispatcher - "
&amp;nbsp;
&amp;nbsp;
Global $TargetUsername
&amp;nbsp;
Global $TargetPassword
&amp;nbsp;
Global $TargetAddress
&amp;nbsp;
Global $ConnectionClientPID = 0
&amp;nbsp;
Global $oIE
&amp;nbsp;
Global $url="SYDHDCVM05-VCS.corp.qf.qantas.com.au/vsphere-client"
&amp;nbsp;
;=======================================
; Code
;=======================================
Exit Main()
&amp;nbsp;
;=======================================
; Main
;=======================================
Func Main()
&amp;nbsp;
	  ToolTip ("Initializing...")
&amp;nbsp;
	  if (PSMGenericClient_Init() &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then
&amp;nbsp;
	  Error(PSMGenericClient_PSMGetLastErrorString())
&amp;nbsp;
	  EndIf
&amp;nbsp;
	  LogWrite("successfully initialized Dispatcher Utils Wrapper - QMC Portal")
&amp;nbsp;
	  FetchSessionProperties()
&amp;nbsp;
	  LogWrite("mapping local drives - IdentityNow")
&amp;nbsp;
	  if (PSMGenericClient_MapTSDrives() &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then
	  Error(PSMGenericClient_PSMGetLastErrorString())
	  EndIf
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
    LogWrite("starting client application")
    ToolTip("Starting " &amp;amp; $DISPATCHER_NAME &amp;amp; "...")
&amp;nbsp;
	$oIE=_IECreate()
	Sleep(500)
	LogWrite(" == Nirmal LOG Starts 2==== ")
&amp;nbsp;
	_IENavigate($oIE, $url, 0)
&amp;nbsp;
&amp;nbsp;
 local  $title = WinGetTitle("vSphere Web Client - Internet Explorer")
   LogWrite($title)
&amp;nbsp;
   WinWaitActive("[CLASS:Credential Dialog Xaml Host]","", 10)
&amp;nbsp;
   If WinExists("[CLASS:Credential Dialog Xaml Host]") Then
      sleep(100)
	  ClipPut(" ")
	  sleep(100)
	  ClipPut($TargetUsername)
	  sleep(100)
	  Send("^v")
	  Send("{TAB}")
	  sleep(200)
	  ClipPut(" ")
      ClipPut($TargetPassword)
	  sleep(250)
	  Send("^v")
	  send("{TAB}")
	  sleep(100)
	  sleep(100)
      send("{ENTER}")
&amp;nbsp;
	Else
	LogWrite(" Nirmal LOG Starts ELSE PART ")
	EndIf
	$ConnectionClientPID = WinGetProcess("[CLASS:IEFrame]")
&amp;nbsp;
	ToolTip("PID " &amp;amp; $ConnectionClientPID &amp;amp; "")
    if ($ConnectionClientPID == 0) Then
    Error(StringFormat("Failed to execute process [%s]", $CLIENT_EXECUTABLE, @error))
    EndIf
&amp;nbsp;
     ; Send PID to PSM as early as possible so recording/monitoring can begin
    LogWrite("sending PID to PSM")
    if (PSMGenericClient_SendPID($ConnectionClientPID) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then
        Error(PSMGenericClient_PSMGetLastErrorString())
    EndIf
&amp;nbsp;
	  LogWrite("Terminating Dispatcher Utils Wrapper")
&amp;nbsp;
	  PSMGenericClient_Term()
&amp;nbsp;
	  Return $PSM_ERROR_SUCCESS
&amp;nbsp;
	  EndFunc
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
Func SiteLogIn()
     LogWrite("Starting SiteLogin funtion - Nirmal2")
    ; sleep(1000)
	  WinActivate("vSphere Web Client - Google Chrome")
	  send("{TAB}")
	  ;send($TargetUsername)
	  ClipPut(" ")
	   sleep(2000)
	   ClipPut($Username)
	  sleep(200)
	  Send("^v")
	  sleep(500)
	  ClipPut(" ")
	  sleep(500)
	  send("{TAB}")
	  ;send($TargetPassword)
	  sleep(500)
	  ClipPut($Password)
	  sleep(500)
	  Send("^v")
	  ClipPut(" ")
	  sleep(500)
	 send("{ENTER}")
&amp;nbsp;
&amp;nbsp;
	; BlockInput(0)
&amp;nbsp;
&amp;nbsp;
EndFunc
&amp;nbsp;
&amp;nbsp;
; #FUNCTION# ====================================================================================================================
; Name...........: Error
; Description ...: An exception handler - displays an error message and terminates the dispatcher
; Parameters ....: $ErrorMessage - Error message to display
; 				   $Code 		 - [Optional] Exit error code
; ===============================================================================================================================
&amp;nbsp;
Func Error($ErrorMessage, $Code = -1)
&amp;nbsp;
	; If the dispatcher utils DLL was already initialized, write an error log message and terminate the wrapper
	if (PSMGenericClient_IsInitialized()) Then
		LogWrite($ErrorMessage, True)
		PSMGenericClient_Term()
	EndIf
&amp;nbsp;
	Local $MessageFlags = BitOr(0, 16, 262144) ; 0=OK button, 16=Stop-sign icon, 262144=MsgBox has top-most attribute set
&amp;nbsp;
	MsgBox($MessageFlags, $ERROR_MESSAGE_TITLE, $ErrorMessage)
&amp;nbsp;
	; If the connection component was already invoked, terminate it
	if ($ConnectionClientPID &amp;lt;&amp;gt; 0) Then
		ProcessClose($ConnectionClientPID)
		$ConnectionClientPID = 0
	EndIf
&amp;nbsp;
	Exit $Code
EndFunc
&amp;nbsp;
; #FUNCTION# ====================================================================================================================
; Name...........: LogWrite
; Description ...: Write a PSMWinSCPDispatcher log message to standard PSM log file
; Parameters ....: $sMessage - [IN] The message to write
;                  $LogLevel - [Optional] [IN] Defined if the message should be handled as an error message or as a trace messge
; Return values .: $PSM_ERROR_SUCCESS - Success, otherwise error - Use PSMGenericClient_PSMGetLastErrorString for details.
; ===============================================================================================================================
Func LogWrite($sMessage, $LogLevel = $LOG_LEVEL_TRACE)
	Return PSMGenericClient_LogWrite($LOG_MESSAGE_PREFIX &amp;amp; $sMessage, $LogLevel)
EndFunc
&amp;nbsp;
; #FUNCTION# ====================================================================================================================
; Name...........: PSMGenericClient_GetSessionProperty
; Description ...: Fetches properties required for the session
; Parameters ....: None
; Return values .: None
; ===============================================================================================================================
Func FetchSessionProperties() ; CHANGE_ME
&amp;nbsp;
	if (PSMGenericClient_GetSessionProperty("UserName", $Username) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then
		Error("UserName paramter is missing")
	EndIf
&amp;nbsp;
	if (PSMGenericClient_GetSessionProperty("Password", $Password) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then
		Error("Password paramter is missing")
     EndIf
&amp;nbsp;
     ; if (PSMGenericClient_GetSessionProperty("Address", $Address) &amp;lt;&amp;gt; $PSM_ERROR_SUCCESS) Then
	;	Error("Address paramter is missing")
	;EndIf
&amp;nbsp;
EndFunc&lt;/CODE&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 05:21:30 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323481#M22418</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-06-12T05:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: VSphere Web - AutoIT</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323482#M22419</link>
      <description>&lt;P&gt;Would it be possible for you post the error as well and why don't u give a try using PGU 1.3 for PSM web connectors?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 05:31:24 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323482#M22419</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-06-12T05:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: VSphere Web - AutoIT</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323483#M22420</link>
      <description>&lt;P&gt;Would it be possible for you post the error as well and why don't u give a try using PGU 1.3 for PSM web connectors?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 05:31:24 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323483#M22420</guid>
      <dc:creator>HP1</dc:creator>
      <dc:date>2019-06-12T05:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: VSphere Web - AutoIT</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323484#M22421</link>
      <description>&lt;P&gt;Hi @Nirmalkumar Dhanaraj​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it in the background tries to run something that is blocked by the applocker on the PSM?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also if you add a few logs messages, you can try to see where it fails, but also what succeeds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I use for IE an IESkelleton script. I don't know if you have access to that script? Since, if it IE I always use that, because it includes extra functions like hardening and stuff like that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Jelle&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 11:00:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323484#M22421</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-06-12T11:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: VSphere Web - AutoIT</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323485#M22422</link>
      <description>&lt;P&gt;Good day, Nirmal!&lt;/P&gt;&lt;P&gt;Perhaps, it would be better to turn on flash permanently in registry on specific URL and use web connector?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 07:56:26 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323485#M22422</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-07-11T07:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: VSphere Web - AutoIT</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323486#M22423</link>
      <description>&lt;P&gt;Hi @Gleb Smagin​&amp;nbsp;.. thanks for your email ..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've done this via GPO exception (URL) and come up with a autoit script. &lt;/P&gt;&lt;P&gt;if you say it is possible via web connector, can you please share any screenshot or more details if possible?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 21:23:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323486#M22423</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-07-11T21:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: VSphere Web - AutoIT</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323487#M22424</link>
      <description>&lt;P&gt;Here is my connector for vCloud Director. It is using iFrame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to use webdriver for some reason it would be better to install webdriver libraries for autoit and code should be something like this(I'm using Chrome because IE crashes time to time &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;#include "wd_core.au3"&lt;/P&gt;&lt;P&gt;#include "wd_helper.au3"&lt;/P&gt;&lt;P&gt;Local $sDesiredCapabilities, $sSession, $sButton&lt;/P&gt;&lt;P&gt;SetupChrome()&lt;/P&gt;&lt;P&gt;_WD_Startup()&lt;/P&gt;&lt;P&gt;$sSession = _WD_CreateSession($sDesiredCapabilities)&lt;/P&gt;&lt;P&gt;_WD_Navigate($sSession, $TargetAddress)&lt;/P&gt;&lt;P&gt;_ChromeSetInputValueByName($sSession,'username',$TargetUsername)&lt;/P&gt;&lt;P&gt;_ChromeSetInputValueByName($sSession,'password',$TargetPassword)&lt;/P&gt;&lt;P&gt;_WD_Shutdown()&lt;/P&gt;&lt;P&gt;Send("{ENTER}")&lt;/P&gt;&lt;P&gt;Func SetupChrome()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;_WD_Option('Driver', 'chromedriver.exe')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;_WD_Option('Port', 9515)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true, "args":[' &amp;amp; """start-maximized""," &amp;amp; " ""disable-infobars""" &amp;amp; "" &amp;amp; '] }}}}'&lt;/P&gt;&lt;P&gt;&amp;nbsp;EndFunc&amp;nbsp;&amp;nbsp;;==&amp;gt;SetupChrome&lt;/P&gt;&lt;P&gt;&amp;nbsp;Func _ChromeSetInputValueByName($sSession,$Name,$Value)&lt;/P&gt;&lt;P&gt;&amp;nbsp;$sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@name='"&amp;amp;$name&amp;amp;"']")&lt;/P&gt;&lt;P&gt;&amp;nbsp;_WD_ElementAction($sSession,$sButton,'value', $Value)&lt;/P&gt;&lt;P&gt;EndFunc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Field_Content_versions_oct20__0682J000005iwdKQAQ.png"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/74496i95C71ADBA9312267/image-size/large?v=v2&amp;amp;px=999" role="button" title="Field_Content_versions_oct20__0682J000005iwdKQAQ.png" alt="Field_Content_versions_oct20__0682J000005iwdKQAQ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 07:22:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323487#M22424</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-07-12T07:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: VSphere Web - AutoIT</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323488#M22425</link>
      <description>&lt;P&gt;@Nirmalkumar Dhanaraj​&amp;nbsp; thanks for the code,&lt;/P&gt;&lt;P&gt;we have  changed a custom code from for a VNC connector +  few codes from You.&lt;/P&gt;&lt;P&gt;our scenario, we allowed the exception of  unrecognized  ssl certification, and  add credentials. flash player is been allowed form registry .  &lt;/P&gt;&lt;P&gt;but when we add it to the account and test,  we getting a page to allow flash. right clicking  the middle of the page.&lt;/P&gt;&lt;P&gt;if we manually try it in PSM server we don't get it. flash player enabled and it's connecting smoothly .&lt;/P&gt;&lt;P&gt;have you experienced this before ?  have you able to add the Vsphere with flash ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0682J0000070hTLQAY.jpg"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/75894i476C4F044F978CEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0682J0000070hTLQAY.jpg" alt="0682J0000070hTLQAY.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 05:36:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323488#M22425</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2019-09-19T05:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: VSphere Web - AutoIT</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323489#M22426</link>
      <description>&lt;P&gt;Hi Nirmal, Do you've a working Auto IT script for VMWARE flash web console login via PSM. If so, please can you share it.&lt;/P&gt;&lt;P&gt;We're also trying to deploy the same in our environment, but the one we developed is not standard and failing sometimes.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2020 14:57:00 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/vsphere-web-autoit/m-p/1323489#M22426</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2020-01-03T14:57:00Z</dc:date>
    </item>
  </channel>
</rss>

