Skip to content

Cannot select PSCredential UA-variables to use for for PSCredential script parameters #271

@jantari

Description

@jantari

Is your feature request related to a problem? Please describe.
I am not sure whether this is supposed to work and this is a bug, or whether what I want is a feature request. I went with a feature request for now.

We have a lot of scripts (nearly all of them) that take one or more [PSCredential] parameters. E.g.

Param (
    # [ ... truncated ... ]
    [PSCredential]$ADAdmin,
    [PSCredential]$vSphereAdmin,
    [PSCredential]$DatabaseLogin,
    [PSCredential]$ProductXYZAPIKey,
    [PSCredential]$ExchangeAdmin
    # [ ... truncated ... ]
)

and I thought I could declare Secrets (variables) and then select these from a drop-down for all [PSCredential] parameters.
However in UA v.2.1.0 this does not work. I can only select a secret of type PSCredential for the "Run As" field when invoking a script, but that's often useless when multiple credentials are required for a script or when gMSA Accounts are used that can only login on specific servers (and the Universal Automation server is not one of those) or when Credential-variables are passed into remote sessions within the script to solve double-hop authentication issues (e.g. $using:ADAdmin)

Describe the solution you'd like
Being able to select PSCredential secrets via dropdown to fill PSCredential parameters in scripts.

Describe alternatives you've considered
None.

Additional context
Screenshot of the problem:
image

Tested on Universal Autiomation v.2.1.0, run on Windows Server 2019 Core from the extracted ZIP

Metadata

Metadata

Assignees

No one assigned

    Labels

    PowerShell UniversalIssue relates to PowerShell Universal.completedThe issue has been completed but is not yet released.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions