Questions tagged as ['azure-cli']

The Azure CLI allows Azure users to manage their Azure assets and interact with their Azure services, applications, containers, and infrastructure in an idiomatic way.
Score: 0
Fabian Raj avatar
How to list all function apps and it's storage account
in flag

Is there anyway to combine both commands below where it lists all the function app together with the storage account used for it?

This command gets all the function app in the subscription

az functionapp list 

This command gets the storage account used by the function app

az functionapp config appsettings list --name <appname> -g <rg> --query "[].{name:name, value:value}[?name=='AzureWeb ...
Score: 0
Anonymous Corp avatar
Getting TSV file output excluding 2 resource types from the az resource list in Azure CLI
cn flag

Kindly concern that I need to get the azure resource list from the azure CLI excluding 2 kinds of resource types and output the file to a TSV file. I was able do this particular operation via PowerShell from the following command.

PowerShell Command - get-azresource | where ResourceType -notmatch microsoft.network/privatednszones/virtualnetworklinks | where ResourceType -notmatch microsoft.insights/ac ...
Score: 0
Fabian Raj avatar
Create an Azure Internal Loadbalancer with Zone Redundant Properies
in flag

This is the command that I tried to use and the error message received is shown below the command

az network lb create --name <name> -g <RG name> --frotnend-ip-name <frontend_name> --frontend-ip-zone "1","2","3" -l southeastasia --private-ip-address <“static_ip”> --private-ip-address-version IPv4 --sku Standard --subnet “<subnet_id>” --subnet-address-prefix “ ...
Score: 0
Bender the Greatest avatar
Unable to resolve Shared Gallery images shared with me by publisher despite their visibility in the UI
sm flag

I am unable to find images shared with me via a Shared Image gallery. The issue is present with both the Az cmdlets and the Az CLI, though for consistency I will stick with PowerShell examples here. Note that referencing publicly available images, such as those published by MicrosoftWindowsServer, are able to be resolved as expected.

There are two shared galleries in question, both are within the sa ...

Score: 0
Adrian avatar
What is the default RBAC scope used when assigning a role in Azure with the CLI?
us flag

This is the documentation for the az role assignment create command: https://docs.microsoft.com/en-us/cli/azure/role/assignment?view=azure-cli-latest#az-role-assignment-create

--score is an optional parameter. This is what the documentation says about it:

Scope at which the role assignment or definition applies to, e.g., /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471- ...

Score: 2
Elias Arellano avatar
Azure run command for Fortinet virtual machine with serial console?
cn flag

I'm trying to execute with Azure a .conf file that has some command lines that are executable into the Fortinet's serial console in a virtual machine with FortiOS v6.4.3 (Linux based system).

I use AZ CLI to execute the script into the virtual machine. the command is the following:

az vm run-command invoke --subscription "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" --resource-group "myresourcegroup" --name  ...
Score: 0
Elias Arellano avatar
How to install modules for az cli in powershell?
cn flag

I'm trying to install the module called az desktoprvirtualization in Azure CLI and I don't know how to install this extension module in Powershell.

I want to know how to do that in Azure DevOps pipelines and also in a local terminal.

Actually Azure DevOps tells that I can install that by adding this code az config set extension.use_dynamic_install=yes_without_prompt to avoid prompts. But I don't know ho ...

Score: 1
Elias Arellano avatar
When remediation for policy is activated in Azure?
cn flag

We create a virtual machine that needs 2 extensions, for that we define and assign 2 customs policies, also we create and activate remediation task to make sure that all virtual machines (new ad old vms) have these 2 extensions. Everything is done with Azure CLI.

The problem is that some times, remediation is activated immediately, or not at all even after 2 hours, and sometimes compliance doesn' ...