In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Using run tool to run a powershell script as an admin without prompting for credentials

Jakem45
5 - Atom

Hi All, I've been stuck on this issue for a while. I am trying to create a workflow that will automate adding accounts to active directory groups. I have a powershell script that will actually add the members. The issue is that to make changes in active directory, the script has to be run as admin. I haven't been able to figure out how to do this while using Alteryx as a non-admin. I've tried writing another script that would execute the add member script as an admin, but I haven't been able to get that to work. I just wanted to post this here and see if maybe there's some work around I haven't considered. Thank you in advance for any replies.

2 REPLIES 2
flying008
15 - Aurora

Hi, @Jakem45 

 

Add below sample code before your powershell script body: (please replace your admin name and password in it)

$securePassword = ConvertTo-SecureString "Password123" -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential("Administrator", $securePassword)
Start-Process powershell -Verb runAs -Credential $credential

 

Jakem45
5 - Atom

Thank you!!

Labels
Top Solution Authors