Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Powershell Plug-in 1.0.6 - how do I pass a SecureString from vRO to Powershell host?

$
0
0

I need to pass a SecureString variable value from a vRO input parameter to the Powershell host.

I've imported a powershell script using "Generate action from PS script". One of the variables is a securestring used for an authentication mechanism on the remote PS host. The value is inserted by the user when he starts the workflow in vRO (type SecureString).

It looks like this:

- User puts in a secure string in the presentation

- the workflow is executed and the value of the variable is used during the script execution on the PS host

- there it has to be used as System.Data.SqlClient.SqlCredential

 

Edit:

some more clarification. Part of the script hat to check if the SQL User credentials provided by the user can be used to connect to a MS SQL database:

 

$SqlConnection = New-Object System.Data.SqlClient.SqlConnection

$SqlConnection.ConnectionString = "Server = $strServer; Database = $dbname;"

 

$SqlCredential = New-Object System.Data.SqlClient.SqlCredential($loginAccount,$securePassword)

$SqlConnection.Credential = $SqlCredential

 

$SqlConnection.Open()

 

$securePassword must be passed through from vRO.

 

How could I achieve this? I unserstand the SecureString from vCO has to be decrypted - which key could I use? How do I convert the vRO SecureString input so that the PS host recognizes it as such?

Thanks!


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>