How can I import the credentials that are stored in Windows Credential manager into PowerShell Universal as a secret variable as part of my code? I can do this manually using the GUI, but I need this to be done as part of the dashboard script so that the user’s credentials are available/accessible during runtime.
Thanks @adam. Is there a way to do this without hard coding usernames? I wanting to import the users’ credentials every time a new user accesses the dashboard. Is there a way to import all available credentials listed in Windows Credential Manager as opposed to manually typing in a specific username/password?
I added the provided code to my authentication.ps1 file and that was exactly what I needed. I am now storing the user’s credentials in PSU as a secret variable. Thanks!