azure devops
3 TopicsExecuting a .exe using Powershell on a remote server with Azure agent
Hi, I have a Windows 2012 server with a Azure DevOps agent running on it. The agent was registered with a regular Windows NT authority login. I am required to execute a powershell task using the Azure DevOps pipeline. The powershell will execute a .exe hosted on the server but it needs to pass some user credentials to the .exe. In the pipeline task, we have tried using the Start-Process cmdlet and passed the path to the .exe, and argument objects, but the pipeline doesn't execute the powershell script. It looks like in order for the agent to launch the Powershell remotely, it needs to have Administrator privileges. Can someone verify this is true? If yes, how can we elevate the agent privileges to allow it to launch the PS session? Any help appreciated.4.2KViews0likes8Commentspowershell to run git commit using PAT in Azure github pipelines
I created a Personal Access Token for my repository and named it as 'PAT', created a variable called 'PATSecret' in my pipeline for the secret of PAT. Passing PATSecret as an input variable for $Cred. But when trying to use this secret to run commit command, authentication is failing. param( [string]$Cred ) git --version git add . Write-Host "setup author info" git config user.email you@you.com git config user.name "your name" Write-Host "git commit with message" git commit -m "Test Commit from Azure DevOps" git push -u https://PAT:$($cred)@dev.azure.com/project/_git/myrepo HEAD Error message: fatal: Authentication failed for 'https://dev.azure.com/project/_git/myrepo/' ##[error]PowerShell exited with code '1'.Solved7.5KViews1like4CommentsConsuming Azure DevOps Library/Key Vault
Does anyone know a good way to consume linked Key Vault values in powershell build or release steps? Normal values can be grabbed with gci $env in the environment variables but I'm stumped on consuming secure values. Steps: 1. Link Key Vault to DevOps library 2. ??? 3. Profit872Views0likes1Comment