Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 10a8516

Browse files
committedApr 13, 2022
Azure CLI Code tag cleanup
1 parent 9a4c06d commit 10a8516

17 files changed

+127
-127
lines changed
 

‎articles/cosmos-db/sql/tutorial-springboot-azure-kubernetes-service.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@ If you intend to run the application on Azure Kubernetes Service, skip this sect
157157

158158
1. Log into Azure Container Registry.
159159

160-
```bash
160+
```azurecli
161161
az acr login -n cosmosdbspringbootregistry
162162
```
163163

164164
1. Push image to Azure Container Registry and list it.
165165

166-
```bash
166+
```azurecli
167167
docker push cosmosdbspringbootregistry.azurecr.io/spring-cosmos-app:v1
168168
169169
az acr repository list --name cosmosdbspringbootregistry --output table

‎articles/databox-online/azure-stack-edge-gpu-create-virtual-machine-marketplace-image.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ az vm image list --all --publisher "Canonical"
6464

6565
Here is an example output when VM images of a certain publisher, offer, and SKU were queried.
6666

67-
```output
67+
```azurecli
6868
PS /home/user> az vm image list --all --publisher "Canonical" --offer "UbuntuServer" --sku "12.04.4-LTS"
6969
[
7070
{
@@ -176,7 +176,7 @@ Create an Azure Managed Disk from your chosen Marketplace image.
176176
177177
Here is an example output:
178178
179-
```output
179+
```azurecli
180180
PS /home/user> $urn = “MicrosoftWindowsServer:WindowsServer:2019-Datacenter:Latest”
181181
PS /home/user> $diskName = "newmanageddisk1"
182182
PS /home/user> $diskRG = "newrgmd1"

‎articles/databox-online/azure-stack-edge-gpu-deploy-virtual-machine-cli-python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Before you begin creating and managing a VM on your Azure Stack Edge Pro device
292292
```
293293
The following shows sample usage of the above command:
294294
295-
```output
295+
```azurecli
296296
PS C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2> az cloud register -n az-new-env --endpoint-resource-manager "https://management.team3device.teatraining1.com"
297297
```
298298
@@ -304,7 +304,7 @@ Before you begin creating and managing a VM on your Azure Stack Edge Pro device
304304
```
305305
The following shows sample usage of the above command:
306306
307-
```output
307+
```azurecli
308308
PS C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2> az cloud set -n az-new-env
309309
Switched active cloud to 'az-new-env'.
310310
Use 'az login' to log in to this cloud.

‎articles/synapse-analytics/spark/use-prometheus-grafana-to-monitor-apache-spark-application-level-metrics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Or use the [Azure Cloud Shell](https://shell.azure.com/), which already includes
3030

3131
## Log in to Azure
3232

33-
```bash
33+
```azurecli
3434
az login
3535
az account set --subscription "<subscription_id>"
3636
```
@@ -48,7 +48,7 @@ Note: This step can be skipped if you already have an AKS cluster.
4848

4949
## Create a service principal and grant permission to Synapse workspace
5050

51-
```bash
51+
```azurecli
5252
az ad sp create-for-rbac --name <service_principal_name> --role Contributor --scopes /subscriptions/<subscription_id>
5353
```
5454

@@ -139,7 +139,7 @@ helm delete <release_name> -n <namespace>
139139

140140
Delete the AKS cluster.
141141

142-
```bash
142+
```azurecli
143143
az aks delete --name <kubernetes_cluster_name> --resource-group <kubernetes_cluster_rg>
144144
```
145145

‎articles/virtual-desktop/azure-stack-hci.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,25 +106,25 @@ You can find the image you're looking for by using the **Search** function in Az
106106

107107
If you're looking for Windows 10 multi-session, you can run a search with this criteria:
108108

109-
```azure
109+
```azurecli
110110
az vm image list --all --publisher "microsoftwindowsdesktop" --offer "windows-10" --sku "21h1-evd-g2"
111111
```
112112

113113
This command should return the following URN:
114114

115-
```azure
115+
```output
116116
MicrosoftWindowsDesktop:Windows-10:21h1-evd-g2:latest
117117
```
118118

119119
If you're looking for Windows Server 2019 datacenter, you can run the following criteria in your Azure CLI:
120120

121-
```azure
121+
```azurecli
122122
az vm image list --all --publisher "microsoftwindowsserver" --offer "WindowsServer" --sku "2019-Datacenter-gen2"
123123
```
124124

125125
This command should return the following URN:
126126

127-
```azure
127+
```output
128128
MicrosoftWindowsServer:windowsserver-gen2preview:2019-datacenter-gen2:latest
129129
```
130130

@@ -139,15 +139,15 @@ To create an Azure managed disk:
139139

140140
1. Run the following commands in an Azure command-line prompt to set the parameters of your managed disk. Make sure to replace the items in brackets with the values relevant to your scenario.
141141

142-
```azure
142+
```console
143143
$urn = <URN of the Marketplace image> #Example: “MicrosoftWindowsServer:WindowsServer:2019-Datacenter:Latest”
144144
$diskName = <disk name> #Name for new disk to be created
145145
$diskRG = <resource group> #Resource group that contains the new disk
146146
```
147147

148148
2. Run these commands to create the disk and generate a Serial Attached SCSI (SAS) access URL.
149149

150-
```azure
150+
```azurecli
151151
az disk create -g $diskRG -n $diskName --image-reference $urn
152152
$sas = az disk grant-access --duration-in-seconds 36000 --access-level Read --name $diskName --resource-group $diskRG
153153
$diskAccessSAS = ($sas | ConvertFrom-Json)[0].accessSas
@@ -166,7 +166,7 @@ To export the VHD:
166166
>[!NOTE]
167167
>If you're running azcopy, you may need to skip the md5check by running this command:
168168
>
169-
> ```azure
169+
> ```azurecli
170170
> azcopy copy “$sas" "destination_path_on_cluster" --check-md5 NoCheck
171171
> ```
172172
@@ -176,7 +176,7 @@ When you're done with your VHD, you'll need to free up space by deleting the man
176176
177177
To delete the managed disk you created, run these commands:
178178
179-
```azure
179+
```azurecli
180180
az disk revoke-access --name $diskName --resource-group $diskRG
181181
az disk delete --name $diskName --resource-group $diskRG --yes
182182
```

‎articles/virtual-machines/custom-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To use custom data, you must Base64-encode the contents before passing the data
2222

2323
In the CLI, you can pass your custom data as a file, as the following example shows. The file will be converted to Base64.
2424

25-
```bash
25+
```azurecli
2626
az vm create \
2727
--resource-group myResourceGroup \
2828
--name centos74 \

‎articles/virtual-machines/linux/cli-ps-findimage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ If you have an existing VHD from a VM that was created using a paid Azure Market
264264

265265
If you still have the original VM, or another VM created using the same marketplace image, you can get the plan name, publisher, and product information from it using [az vm get-instance-view](/cli/azure/vm#az-vm-get-instance-view). This example gets a VM named *myVM* in the *myResourceGroup* resource group and then displays the purchase plan information.
266266

267-
```azurepowershell-interactive
267+
```azurecli-interactive
268268
az vm get-instance-view -g myResourceGroup -n myVM --query plan
269269
```
270270

‎articles/virtual-machines/linux/how-to-resize-encrypted-lvm.md

Lines changed: 85 additions & 85 deletions
Large diffs are not rendered by default.

‎articles/virtual-machines/linux/image-builder-devops-task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ There are two Azure VM Image Builder (AIB) DevOps Tasks:
4848
New-AzStorageAccount -ResourceGroupName $strResourceGroup -Name $storageAccName -Location $location -SkuName Standard_LRS
4949
```
5050
51-
```bash
51+
```azurecli
5252
# Az CLI
5353
location=westus
5454
scriptStorageAcc=aibstordot$(date +'%s')

‎articles/virtual-machines/linux/image-builder-json.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ You can distribute an image to both of the target types in the same configuratio
570570
571571
Because you can have more than one target to distribute to, Image Builder maintains a state for every distribution target that can be accessed by querying the `runOutputName`. The `runOutputName` is an object you can query post distribution for information about that distribution. For example, you can query the location of the VHD, or regions where the image version was replicated to, or SIG Image version created. This is a property of every distribution target. The `runOutputName` must be unique to each distribution target. Here is an example, this is querying an Azure Compute Gallery distribution:
572572

573-
```bash
573+
```azurecli
574574
subscriptionID=<subcriptionID>
575575
imageResourceGroup=<resourceGroup of image template>
576576
runOutputName=<runOutputName>
@@ -720,7 +720,7 @@ Invoke-AzResourceAction -ResourceName $imageTemplateName -ResourceGroupName $ima
720720
```
721721

722722

723-
```bash
723+
```azurecli
724724
az resource invoke-action \
725725
--resource-group $imageResourceGroup \
726726
--resource-type Microsoft.VirtualMachineImages/imageTemplates \
@@ -740,7 +740,7 @@ Examples of `cancel` commands:
740740
Invoke-AzResourceAction -ResourceName $imageTemplateName -ResourceGroupName $imageResourceGroup -ResourceType Microsoft.VirtualMachineImages/imageTemplates -ApiVersion "2021-10-01" -Action Cancel -Force
741741
```
742742

743-
```bash
743+
```azurecli
744744
az resource invoke-action \
745745
--resource-group $imageResourceGroup \
746746
--resource-type Microsoft.VirtualMachineImages/imageTemplates \

‎articles/virtual-machines/linux/image-builder-troubleshoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ Deployment failed. Correlation ID: XXXXXX-XXXX-XXXXXX-XXXX-XXXXXX. Failed in dis
357357

358358
Image Builder timed out waiting for the image to be added and replicated to the Azure Compute Gallery. If the image is being injected into the SIG, it can be assumed the image build was successful. However, the overall process failed, because the image builder was waiting on Azure Compute Gallery to complete the replication. Even though the build has failed, the replication continues. You can get the properties of the image version by checking the distribution *runOutput*.
359359

360-
```bash
360+
```azurecli
361361
$runOutputName=<distributionRunOutput>
362362
az resource show \
363363
--ids "/subscriptions/$subscriptionID/resourcegroups/$imageResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/$imageTemplateName/runOutputs/$runOutputName" \

‎articles/virtual-machines/linux/image-builder-vnet.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ az group create -n $imageResourceGroup -l $location
6565

6666
If you do not have an existing VNET\Subnet\NSG, use the following script to create one.
6767

68-
```bash
68+
```azurecli
6969
7070
# Create a resource group
7171
@@ -151,7 +151,7 @@ sed -i -e "s/<vnetRgName>/$vnetRgName/g" aibRoleNetworking.json
151151

152152
Image Builder will use the [user-identity](../../active-directory/managed-identities-azure-resources/qs-configure-cli-windows-vm.md#user-assigned-managed-identity) provided to inject the image into the Azure Compute Gallery (formerly known as Shared Image Gallery). In this example, you will create an Azure role definition that has the granular actions to perform distributing the image to the SIG. The role definition will then be assigned to the user-identity.
153153

154-
```bash
154+
```azurecli
155155
# create user assigned identity for image builder
156156
idenityName=aibBuiUserId$(date +'%s')
157157
az identity create -g $imageResourceGroup -n $idenityName
@@ -176,7 +176,7 @@ sed -i -e "s/Azure Image Builder Service Networking Role/$netRoleDefName/g" aibR
176176

177177
Instead of granting Image Builder lower granularity and increased privilege, you can create two roles. One gives the builder permissions to create an image, the other allows it to connect the build VM and load balancer to your VNET.
178178

179-
```bash
179+
```azurecli
180180
# create role definitions
181181
az role definition create --role-definition ./aibRoleImageCreation.json
182182
az role definition create --role-definition ./aibRoleNetworking.json

‎articles/virtual-machines/linux/no-agent.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ This demo will show how you can take an existing Marketplace image (in this case
4848

4949
### Create the resource group and base VM:
5050

51-
```bash
51+
```azurecli
5252
$ az group create --location eastus --name demo1
5353
```
5454

5555
Create the base VM:
5656

57-
```bash
57+
```azurecli
5858
$ az vm create \
5959
--resource-group demo1 \
6060
--name demo1 \
@@ -284,14 +284,14 @@ Now the VM is ready to be generalized and have an image created from it.
284284

285285
Back on your development machine, run the following to prepare for image creation from the base VM:
286286

287-
```bash
287+
```azurecli
288288
$ az vm deallocate --resource-group demo1 --name demo1
289289
$ az vm generalize --resource-group demo1 --name demo1
290290
```
291291

292292
And create the image from this VM:
293293

294-
```bash
294+
```azurecli
295295
$ az image create \
296296
--resource-group demo1 \
297297
--source demo1 \
@@ -301,7 +301,7 @@ $ az image create \
301301

302302
Now we are ready to create a new VM (or multiple VMs) from the image:
303303

304-
```bash
304+
```azurecli
305305
$ IMAGE_ID=$(az image show -g demo1 -n demo1img --query id -o tsv)
306306
$ az vm create \
307307
--resource-group demo12 \

‎articles/virtual-machines/workloads/oracle/oracle-database-quick-create.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ After you create the VM, Azure CLI displays information similar to the following
6767
```
6868
## Create and attach a new disk for Oracle datafiles and FRA
6969

70-
```bash
70+
```azurecli
7171
az vm disk attach --name oradata01 --new --resource-group rg-oracle --size-gb 64 --sku StandardSSD_LRS --vm-name vmoracle19c
7272
```
7373

7474
## Open ports for connectivity
7575
In this task you must configure some external endpoints for the database listener to use by setting up the Azure Network Security Group that protects the VM.
7676

7777
1. To open the endpoint that you use to access the Oracle database remotely, create a Network Security Group rule as follows:
78-
```bash
78+
```azurecli
7979
az network nsg rule create ^
8080
--resource-group rg-oracle ^
8181
--nsg-name vmoracle19cNSG ^
@@ -85,7 +85,7 @@ In this task you must configure some external endpoints for the database listene
8585
--destination-port-range 1521
8686
```
8787
2. To open the endpoint that you use to access Oracle remotely, create a Network Security Group rule with az network nsg rule create as follows:
88-
```bash
88+
```azurecli
8989
az network nsg rule create ^
9090
--resource-group rg-oracle ^
9191
--nsg-name vmoracle19cNSG ^
@@ -96,7 +96,7 @@ In this task you must configure some external endpoints for the database listene
9696
```
9797
3. If needed, obtain the public IP address of your VM again with az network public-ip show as follows:
9898

99-
```bash
99+
```azurecli
100100
az network public-ip show ^
101101
--resource-group rg-oracle ^
102102
--name vmoracle19cPublicIP ^

‎articles/virtual-machines/workloads/sap/automation-tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ The sample SAP Library configuration file `MGMT-NOEU-SAP_LIBRARY.tfvars` is in t
383383
384384
- If you have authentication issues directly after running the script `prepare_region.sh`, run:
385385
386-
```bash
386+
```azurecli
387387
az logout
388388
389389
az login
@@ -488,7 +488,7 @@ For this example configuration, the resource group is `MGMT-NOEU-DEP00-INFRASTRU
488488
> [!NOTE]
489489
> The use of single quotes when setting `sap_user_password` is important. The use of special characters in the password can otherwise cause unpredictable results!
490490

491-
```bash
491+
```azurecli
492492
sap_user_password='<sap-password>'
493493
494494
az keyvault secret set --name "S-Password" --vault-name "${key_vault}" --value "${sap_user_password}";

‎articles/virtual-network/ip-services/create-vm-dual-stack-ipv6-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Use [az network public-ip show](/cli/azure/network/public-ip#az-network-public-i
178178
--output tsv
179179
```
180180

181-
```bash
181+
```azurecli
182182
user@Azure:~$ az network public-ip show \
183183
> --resource-group myResourceGroup \
184184
> --name myPublicIP-IPv4 \
@@ -195,7 +195,7 @@ user@Azure:~$ az network public-ip show \
195195
--output tsv
196196
```
197197

198-
```bash
198+
```azurecli
199199
user@Azure:~$ az network public-ip show \
200200
> --resource-group myResourceGroup \
201201
> --name myPublicIP-IPv6 \

‎includes/functions-add-output-binding-view-queue-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ You can view the queue in the [Azure portal](../articles/storage/queues/storage-
3939

4040
# [bash](#tab/bash)
4141

42-
```bash
42+
```azurecli
4343
echo `echo $(az storage message get --queue-name outqueue -o tsv --query '[].{Message:content}') | base64 --decode`
4444
```
4545

4646
# [PowerShell](#tab/powershell)
4747

48-
```powershell
48+
```azurecli
4949
[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($(az storage message get --queue-name outqueue -o tsv --query '[].{Message:content}')))
5050
```
5151

0 commit comments

Comments
 (0)
Please sign in to comment.