Forum Discussion

Kalaimani's avatar
Kalaimani
Brass Contributor
May 31, 2022

Pass the user name and password to connect the azure in DevOps

Dear All,

I'm a learner of DevOps and need your help to connect the Azure PowerShell in DevOps.

 

Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force -AllowClobber
$Uname=$env:Name
$Uname
$Pname = $env:Password | ConvertTo-SecureString -AsPlainText -Force
$Pname
$Credentials = New-Object System.Management.Automation.PSCredential $Uname,$Pname

Connect-AzAccount -Credential $Credentials

 

$env:Name and $env:Password trying to get from DevOps variables

No RepliesBe the first to reply

Resources