May 30 2022
09:14 PM
- last edited on
Mar 05 2024
01:46 PM
by
TechCommunityAP
May 30 2022
09:14 PM
- last edited on
Mar 05 2024
01:46 PM
by
TechCommunityAP
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