Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Team Services - release definition - run task (PowerShell) as admin

In VSTS I have a release definition, which needs to run a PowerShell script as administrator.

The release agent is configured to run as an account, which is a local administrator and has the required permissions, but UAC is restricting those permissions, unless PowerShell is executed "as administrator".

Can I run PS as admin from VSTS without disabling UAC completely on the server?

like image 203
tsw_mik Avatar asked Dec 06 '25 06:12

tsw_mik


1 Answers

I don't think there is a way to do that using PS task. Can you try "Run PS on target servers" and provide admin creds. You will need to provide the machine name of the agent (so this is not ideal) as an input to the task. That might not require UAC. We will file this as a feature request.

like image 157
Vijay Machiraju Avatar answered Dec 08 '25 21:12

Vijay Machiraju



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!