Questions tagged [az]
86 questions
2
votes
1 answer
"az pipelines run variables" not working the way i expected
i have a branch in git with a .yaml build file which has a script to simply print out the value of the variable declared in the .yaml
if i run the command: az pipelines run --id 999 --variables "myvar=myvar" I expected the variable to change as I am…

Kam
- 340
- 2
- 12
2
votes
1 answer
Possible to copy Azure DevOps Boards Shared Queries to another project?
I've been working on migrating all of the work items from one Azure DevOps (Services) project to another project in the same Organization.
I used the nkdAgility azure-devops-migration-tools to successfully copy the majority of existing work items…

str8ball
- 111
- 1
- 12
2
votes
1 answer
Azure - Disconnect VNet Integration in Powershell
Through the Azure portal I can disconnect my VNet integration, see below. I need to do this in a Powershell script, using the Az module. Is this possible?

The Gilbert Arenas Dagger
- 12,071
- 13
- 66
- 80
2
votes
1 answer
az devops login Failed to store PAT using keyring; falling back to file storage
I've installed AZ DEVOPS extension from az cli
az extension add --name azure-devops
az devops login --organization https://myorg.com
But when I insert my DEVOPS Personal Access Token, fail with the following error.
Failed to store PAT using…

Cyber.Drunk
- 165
- 2
- 12
2
votes
1 answer
How to Replace the AzureRM module with Az in Azure Automation Account
I'm trying to use Azure Automation Account to run some jobs, but I'm struggling with the AzureRM Module installed. I manually installed some Az Modules but PowerShell ISE still using the AzureRM, like in trying to establish RunAs connectio…

Nurhun
- 475
- 1
- 9
- 21
2
votes
0 answers
az storage blob upload command fails with strange exception when invoked inside a Windows executable
We have below az storage blob upload command in a powershell script named upload_file.ps1 that uploads a file to Azure storage as a blob.
$ErrorActionPreference = "Stop"
# Blob connection string parsed from a secure string
az storage blob upload…

Ruifeng Ma
- 2,399
- 1
- 22
- 40
1
vote
1 answer
Bash Script with Azure CLI
I am new to shell scripting.
I am trying to use
az sig image-version list
command from azure which should return a list of versions and storing it into a list/array. So I can step through the list in a for loop.
VERSIONS_LIST="$(az sig image-version…

Weisheng Wu
- 1,381
- 2
- 8
- 10
1
vote
2 answers
Get-AzureAccount is not working in Az modules
Get-AzureAccount is not working in Az modules .It is giving below error :
Get-AzureAccount : The 'Get-AzureAccount' command was found in the module 'Azure', but the module could not be loaded. For more information, run 'Import-Module Azure'.
+ …

Jumbo
- 35
- 8
1
vote
2 answers
az cli fails with 'appXXXdeploycr.azurecr.io' is not recognized as an internal or external command, operable program or batch file
All I am trying to do is to run the following command in PS
az webapp config set -g 'appXXX-dfpg-dev4-web-eastus2' -n 'appXXX-dfpg-dev4-web-eastus2-backoffice-apsvc' --linux-fx-version…

Alexey Auslender
- 402
- 5
- 18
1
vote
1 answer
Secure way to save ClientId and ClientSecret to authenticate to Azure using Connect-AzAccount
I am looking for a secure way to have a script running on a local machine and authenticate using these commands in Azure :
$Password = ConvertTo-SecureString -AsPlainText "my_secret" -Force
$Credential = New-Object…

FidelCasto
- 176
- 2
- 15
1
vote
2 answers
Set-AzSqlServerActiveDirectoryAdministrator : Cannot find the Azure Active Directory object 'service_principal_name'
I am running the following command
$sp = az ad sp show --id $env:ARM_CLIENT_ID --query '{objectId: objectId, displayName: displayName}'
az sql server ad-admin create --resource-group data-eastus2 `
--server-name data-eastus2-sqlsvr `
…

Alexey Auslender
- 402
- 5
- 18
1
vote
2 answers
How to I get the last run id for an azure pipeline?
I am writing an automated test suite using powershell and the az cli. I need to be able to download the build pipeline artefacts from the last run of the pipeline to install and test the application. The problem is I need to know the run ID to be…

Rhodri Jenkins
- 11
- 1
- 3
1
vote
1 answer
Get-AzSnapshot issues on powershell and cloudshell
Get-AzSnapshot is showing some weird behaviour.
Get-AzSnapshot -ResourceGroupName $resourceGroupName -SnapshotName $snapshotName
First Issue: The command above gives an error :
Resource group 'xxx' could not be found. ErrorCode:…

Blue Clouds
- 7,295
- 4
- 71
- 112
1
vote
3 answers
Get Cosmosdb Container Collection items using powershell
Team, I had created new CosmosDB account in Azure portal with a container contains list of collection items. I am able to access Container details in power shell script.
How to list collection items or show specific collection item using…

PavanKumar GVVS
- 859
- 14
- 45
1
vote
0 answers
Call a specific function from power shell script file in "az vm invoke" command
$command='az vm run-command invoke --command-id RunPowerShellScript --name '.$vm_name.' --resource-group '.$resource_group.' --scripts @C:/Users/Get-ULogged_In.ps1; ';
In this command I need to call a function from the Get-ULogged_In.ps1 file, by…

Srija Rallabhandy
- 11
- 3