Skip to content

Commit c9d29e3

Browse files
authored
Merge pull request #108788 from TimShererWithAquent/us1669724t
Azure CLI syntax blocks.
2 parents 1db6326 + e77fc2e commit c9d29e3

15 files changed

+59
-58
lines changed

articles/hpc-cache/hpc-cache-netapp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Follow the [mount instructions in the Azure NetApp Files documentation](../azure
7171

7272
You also can find IP addresses with the Azure CLI:
7373

74-
```bash
74+
```azurecli
7575
az netappfiles volume list -g ${RESOURCE_GROUP} --account-name ${ANF_ACCOUNT} --pool-name ${POOL} --query "[].mountTargets[].ipAddress" | grep -Ee '[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+' | tr -d '"' | tr -d , | sort | uniq
7676
```
7777

articles/iot-accelerators/howto-opc-twin-deploy-modules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ The easiest way to deploy the modules to an Azure IoT Edge gateway device is thr
181181

182182
2. Use the following command to apply the configuration to an IoT Edge device:
183183

184-
```bash
184+
```azurecli
185185
az iot edge set-modules --device-id [device id] --hub-name [hub name] --content ./deployment.json
186186
```
187187

@@ -190,7 +190,7 @@ The easiest way to deploy the modules to an Azure IoT Edge gateway device is thr
190190

191191
3. Once you've deployed modules to your device, you can view all of them with the following command:
192192

193-
```bash
193+
```azurecli
194194
az iot hub module-identity list --device-id [device id] --hub-name [hub name]
195195
```
196196

articles/iot-accelerators/iot-accelerators-remote-monitoring-customize-page.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ Optionally, you can connect your local running copy of the web UI to the Remote
153153
154154
1. Use the Azure portal or the [az CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest) to enable SSH access to the virtual machine that hosts the microservices in your solution. For example:
155155
156-
```sh
156+
```azurecli
157157
az network nsg rule update --name SSH --nsg-name {your solution name}-nsg --resource-group {your solution name} --access Allow
158158
```
159159
160160
You should only enable SSH access during test and development. If you enable SSH, [you should disable it again as soon as possible](../security/fundamentals/network-best-practices.md).
161161
162162
1. Use the Azure portal or the [az CLI](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest) to find the name and public IP address of your virtual machine. For example:
163163
164-
```sh
164+
```azurecli
165165
az resource list --resource-group {your solution name} -o table
166166
az vm list-ip-addresses --name {your vm name from previous command} --resource-group {your solution name} -o table
167167
```

articles/iot-central/core/howto-monitor-devices-azure-cli.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ Use the Azure CLI IoT extension to see messages your devices are sending to IoT
2727

2828
Run the following command from your command line to install:
2929

30-
```cmd/sh
30+
```azurecli
3131
az extension add --name azure-iot
3232
```
3333

3434
Check the version of the extension by running:
3535

36-
```cmd/sh
36+
```azurecli
3737
az --version
3838
```
3939

4040
You should see the azure-iot extension is 0.8.1 or higher. If it is not, run:
4141

42-
```cmd/sh
42+
```azurecli
4343
az extension update --name azure-iot
4444
```
4545

@@ -53,7 +53,7 @@ The following sections describe common commands and options that you can use whe
5353

5454
Start by signing into the Azure CLI.
5555

56-
```cmd/sh
56+
```azurecli
5757
az login
5858
```
5959

@@ -63,14 +63,14 @@ In **Administration/Application Settings**, copy the **Application ID**. You wil
6363
### Monitor messages
6464
Monitor the messages that are being sent to your IoT Central app from your devices. This will include all headers and annotations.
6565

66-
```cmd/sh
66+
```azurecli
6767
az iot central app monitor-events --app-id <app-id> --properties all
6868
```
6969

7070
### View device properties
7171
View the current read and read/write device properties for a given device.
7272

73-
```cmd/sh
73+
```azurecli
7474
az iot central device-twin show --app-id <app-id> --device-id <device-id>
7575
```
7676

articles/iot-edge/how-to-deploy-modules-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Change directories into the folder where your deployment manifest is saved. If y
111111

112112
Use the following command to apply the configuration to an IoT Edge device:
113113

114-
```cli
114+
```azurecli
115115
az iot edge set-modules --device-id [device id] --hub-name [hub name] --content [file path]
116116
```
117117

@@ -125,7 +125,7 @@ Once you've deployed modules to your device, you can view all of them with the f
125125

126126
View the modules on your IoT Edge device:
127127

128-
```cli
128+
```azurecli
129129
az iot hub module-identity list --device-id [device id] --hub-name [hub name]
130130
```
131131

articles/iot-edge/how-to-register-device.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The [Azure CLI](https://docs.microsoft.com/cli/azure?view=azure-cli-latest) is a
119119

120120
Use the [az iot hub device-identity create](https://docs.microsoft.com/cli/azure/ext/azure-cli-iot-ext/iot/hub/device-identity?view=azure-cli-latest#ext-azure-cli-iot-ext-az-iot-hub-device-identity-create) command to create a new device identity in your IoT hub. For example:
121121

122-
```cli
122+
```azurecli
123123
az iot hub device-identity create --device-id [device id] --hub-name [hub name] --edge-enabled
124124
```
125125

@@ -135,7 +135,7 @@ This command includes three parameters:
135135

136136
Use the [az iot hub device-identity list](https://docs.microsoft.com/cli/azure/ext/azure-cli-iot-ext/iot/hub/device-identity?view=azure-cli-latest#ext-azure-cli-iot-ext-az-iot-hub-device-identity-list) command to view all devices in your IoT hub. For example:
137137

138-
```cli
138+
```azurecli
139139
az iot hub device-identity list --hub-name [hub name]
140140
```
141141

@@ -145,7 +145,7 @@ Any device that is registered as an IoT Edge device will have the property **cap
145145

146146
When you're ready to set up your device, you need the connection string that links your physical device with its identity in the IoT hub. Use the [az iot hub device-identity show-connection-string](https://docs.microsoft.com/cli/azure/ext/azure-cli-iot-ext/iot/hub/device-identity?view=azure-cli-latest#ext-azure-cli-iot-ext-az-iot-hub-device-identity-show-connection-string) command to return the connection string for a single device:
147147

148-
```cli
148+
```azurecli
149149
az iot hub device-identity show-connection-string --device-id [device id] --hub-name [hub name]
150150
```
151151

articles/iot-edge/offline-capabilities.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ You can declare the parent-child relationship when creating a new device. Or for
6565

6666
Using the [Azure command-line interface](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest) with [IoT extension](https://github.com/azure/azure-iot-cli-extension) (v0.7.0 or newer), you can manage parent child relationships with the [device-identity](https://docs.microsoft.com/cli/azure/ext/azure-cli-iot-ext/iot/hub/device-identity?view=azure-cli-latest) subcommands. The example below uses a query to assign all non-IoT Edge devices in the hub to be child devices of an IoT Edge device.
6767

68-
```shell
68+
```azurecli
6969
# Set IoT Edge parent device
7070
egde_device="edge-device1"
7171

articles/iot-edge/quickstart-linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ If you're running IoT Edge on your local machine or an ARM32 or ARM64 device, yo
133133

134134
The rest of the commands in this quickstart take place on your IoT Edge device itself, so that you can see what's happening on the device. If you're using a virtual machine, connect to that machine now using the public IP address that was output by the creation command. You can also find the public IP address on your virtual machine's overview page in the Azure portal. Use the following command to connect to your virtual machine. Replace `{azureuser}` if you used a different username than the one suggested in the prerequisites. Replace `{publicIpAddress}` with your machine's address.
135135

136-
```azurecli-interactive
136+
```console
137137
ssh azureuser@{publicIpAddress}
138138
```
139139

articles/iot-edge/tutorial-machine-learning-edge-05-configure-edge-device.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ We will deal with the leaf device later in the tutorial. In this section, downlo
190190
191191
1. From the SSH session on the Linux virtual machine, sign in to Azure with the Azure CLI.
192192
193-
```bash
193+
```azurecli
194194
az login
195195
```
196196
@@ -200,7 +200,7 @@ We will deal with the leaf device later in the tutorial. In this section, downlo
200200
201201
1. Set the Azure subscription that you want to use for Azure CLI commands.
202202
203-
```bash
203+
```azurecli
204204
az account set --subscription <subscriptionId>
205205
```
206206
@@ -212,7 +212,7 @@ We will deal with the leaf device later in the tutorial. In this section, downlo
212212
213213
1. Download the certificates that you stored in the key vault: new-edge-device-full-chain.cert.pem, new-edge-device.key.pem, and azure-iot-test-only.root.ca.cert.pem
214214
215-
```bash
215+
```azurecli
216216
key_vault_name="<key vault name>"
217217
sudo az keyvault secret download --vault-name $key_vault_name --name new-edge-device-full-chain-cert-pem -f /edgeMlCertificates/new-edge-device-full-chain.cert.pem
218218
sudo az keyvault secret download --vault-name $key_vault_name --name new-edge-device-key-pem -f /edgeMlCertificates/new-edge-device.key.pem

articles/iot-hub/iot-hub-arduino-iot-devkit-az3166-get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ The DevKit connects to a device-specific endpoint on your IoT hub and sends temp
139139
140140
1. To verify the telemetry data sent to Azure, run the following command in Azure Cloud Shell:
141141
142-
```bash
142+
```azurecli
143143
az iot hub monitor-events --hub-name YourIoTHubName --output table
144144
```
145145

0 commit comments

Comments
 (0)