AnsweredAssumed Answered

Extract password from LOGIN object and put it into script environment variable

Question asked by Michael_Lowry on Feb 4, 2016
Latest reply on Aug 21, 2017 by RadmiloMilojkovic611151
We are investigating using LOGIN objects as secure stores for application passwords, We have set up a custom login type called TSM_TEST. We are able to get unencrypted passwords from a LOGIN object called TSM.LOGIN using the job messenger daemon. The following commands are in a Windows BAT job:

:SET &PW#    = GET_LOGIN(TSM.LOGIN,"*",TSM_TEST,PASSWORD) :PRINT Encrypted password: &PW# &UC_JOBMD CMD="echo &PW#"

  This echoes the password in the job report. What we would like to do next is to capture the password in an environment variable so that we can use the password later in the BAT script. Has anyone ever done this? Ideally we would like to do this in a PowerShell interpreter job, not a BAT job. I have not found a way to run the job messenger daemon from within a PowerShell script though. Has anyone found a way to do this?