How to use PATS to execute a powershell file from an Inline Powershell Script in TFS Build Definition

243 views Asked by At

I'm trying to execute a powershell script XYZ.ps from an Powershell task which is in a TFS Build Definition. The Build Definition is executed with UserA and this UserA does not have permission to Read/Write SQL that the script XYZ.ps executes.

For this reasons, I'm exploring PATS (Personal Access Tokens) which can be created for UserB (who has permissions to execute SQL that the script XYZ.ps executes) so that this UserB can be used to execute ps script XYZ.ps. I can see a lot of the references to using PATS only for rest-api but how can PATS be used

(1) by calling a powershell script with PATS (2) or by passing the specific PAT to powershell script and then using it in the script (3) or any other way to use a PAT with a powershell script.

Base line is that inspite of researching, I don't understand how to use a PAT for my requirement - please help !

0

There are 0 answers