AnsweredAssumed Answered

SSH connector - error handling response

Question asked by Steven Connell Employee on Feb 9, 2017

Has anyone experienced issues getting responses into the SSH connector from Powershell?  We are using an SSH connector for provisioning and deprovisioning Office 365 accounts.  The customer has built a few Powershell scripts that call each other, because they use them to decide what kind of account resources will get and to set up licensing.  When the Powershell script works, everything is fine.  But if Powershell experiences an error, AFX chokes on the response code.  When run from a command line or a unix shell script, everything works fine.  The attached zip file contains the customer's Powershells.

 

Since a unix script handled the Powershell responses successfully, we created a unix script to serve as a wrapper for the SSH connector.  SSH connector calls the unix script which calls Powershell.  Powershell sends response to unix.  Unix can then translate the response to give the right success or failure message to our SSH connector.  The problem with this approach is that when the unix script calls Powershell, Powershell is sending back a login prompt.  Someone suggested that we use an “expect” script to deal with the login process.  Does anyone have experience with writing an "expect" script?

Outcomes