Set the "Run As" for a Powershell Step in Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 05:36 AM
I have a powershell script located on a windows "server A" that is not the mid server.
We are able to log into the windows server as "user 1", launch powershell and run the script.
Now we need to be able to configure the Powershell Step in Flow Designer to execute the script as "user 1".
I set up a credential/connection alias that has "server A" in the connection and "user 1" in the credential.
When I configure the Powershell Step using that alias and explicit remoting, the script is triggered but it's not using "user 1" as the "run as" user. It's using NT AUTHORITY\ANONYMOUS LOGON'.
Any ideas on how to configure the Step to execute the powershell as the user defined in the credential alias?
- Labels:
-
flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 05:42 AM
Hi dc,
I created the Credential Alias entry under IntegrationHub -> Connection & Credential Aliases. My Alias name is "SuperAdmin".
I then went into the Orchestration -> Credentials and had to add the column for "Credential Alias" in the view. I selected my "SuperAdmin" as the alias to be associated with my Orchestration Credential and saved it. Going back to the Credential Aliases, I saw that credential listed under the "SuperAdmin" alias.
This is what i got from richardbrounstein in this post.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 12:20 PM
One option you have is to use an encrypted credential file for that one in PS itself.
$credxml = "C:\path\creds.xml"
$StoredCredentials = Get-Credential
$StoredCredentials | Export-Clixml -Path $credxml
Load the creds with:
$Script:Credentials = Import-Clixml -Path C:\path\creds.xml;
Note, you do need to update it any time you change the password of the account you're using, but its one way around things, if you need multiple different credentials running from a single script.