@@ -23,39 +23,45 @@ This document details how to use Bash and PowerShell in Azure Cloud Shell from t
23
23
24
24
![ Screenshot showing how to start Azure Cloud Shell in the Azure portal.] [ 06 ]
25
25
26
- The first time you start Cloud Shell you're prompted to create a storage account for the Azure
27
- file share.
26
+ The first time you start Cloud Shell you're prompted to create an Azure Storage account for the
27
+ Azure file share.
28
28
29
29
![ Screenshot showing the create storage prompt.] [ 05 ]
30
30
31
- 1 . Select a subscription to create a storage account and Azure file share.
31
+ 1 . Select the ** Subscription ** used to create the storage account and file share.
32
32
1 . Select ** Create storage** .
33
33
34
34
### Select your shell environment
35
35
36
- Cloud Shell allows you to select either Bash or PowerShell for your command-line experience.
36
+ Cloud Shell allows you to select either ** Bash** or ** PowerShell** for your command-line experience.
37
37
38
38
![ Screenshot showing the shell selector.] [ 04 ]
39
39
40
40
### Registering your subscription with Azure Cloud Shell
41
41
42
42
Azure Cloud Shell needs access to manage resources. Access is provided through namespaces that must
43
- be registered to your subscription. Use the following commands to register the Microsoft.CloudShell
44
- RP namespace in your subscription:
43
+ be registered to your subscription. Use the following commands to register the
44
+ ** Microsoft.CloudShell ** namespace in your subscription:
45
45
46
- ### [ Azure CLI] ( #tab/azurecli )
46
+ <!-- markdownlint-disable MD023 -->
47
+ <!-- markdownlint-disable MD024 -->
48
+ <!-- markdownlint-disable MD051 -->
49
+ #### [ Azure CLI] ( #tab/azurecli )
47
50
48
51
``` azurecli-interactive
49
52
az account set --subscription <Subscription Name or Id>
50
53
az provider register --namespace Microsoft.CloudShell
51
54
```
52
55
53
- ### [ Azure PowerShell] ( #tab/powershell )
56
+ #### [ Azure PowerShell] ( #tab/powershell )
54
57
55
58
``` azurepowershell-interactive
56
59
Select-AzSubscription -SubscriptionId <SubscriptionId>
57
60
Register-AzResourceProvider -ProviderNamespace Microsoft.CloudShell
58
61
```
62
+ <!-- markdownlint-enable MD023 -->
63
+ <!-- markdownlint-enable MD024 -->
64
+ <!-- markdownlint-enable MD051 -->
59
65
60
66
---
61
67
@@ -66,60 +72,57 @@ Register-AzResourceProvider -ProviderNamespace Microsoft.CloudShell
66
72
67
73
1 . List subscriptions you have access to.
68
74
69
- ### [ Azure CLI] ( #tab/azurecli )
75
+ <!-- markdownlint-disable MD023 -->
76
+ <!-- markdownlint-disable MD024 -->
77
+ <!-- markdownlint-disable MD051 -->
78
+ #### [ Azure CLI] ( #tab/azurecli )
70
79
71
80
``` azurecli-interactive
72
81
az account list
73
82
```
74
83
75
- ### [ Azure PowerShell] ( #tab/powershell )
84
+ #### [ Azure PowerShell] ( #tab/powershell )
76
85
77
86
``` azurepowershell-interactive
78
87
Get-AzSubscription
79
88
```
89
+ <!-- markdownlint-enable MD023 -->
90
+ <!-- markdownlint-enable MD024 -->
91
+ <!-- markdownlint-enable MD051 -->
80
92
81
93
---
82
94
83
95
1 . Set your preferred subscription:
84
96
85
- ### [ Azure CLI] ( #tab/azurecli )
97
+ <!-- markdownlint-disable MD023 -->
98
+ <!-- markdownlint-disable MD024 -->
99
+ <!-- markdownlint-disable MD051 -->
100
+ #### [ Azure CLI] ( #tab/azurecli )
86
101
87
102
``` azurecli-interactive
88
103
az account set --subscription 'my-subscription-name'
89
104
```
90
105
91
- ### [ Azure PowerShell] ( #tab/powershell )
106
+ #### [ Azure PowerShell] ( #tab/powershell )
92
107
93
108
``` azurepowershell-interactive
94
109
Set-AzContext -Subscription <SubscriptionId>
95
110
```
111
+ <!-- markdownlint-enable MD023 -->
112
+ <!-- markdownlint-enable MD024 -->
113
+ <!-- markdownlint-enable MD051 -->
96
114
97
115
---
98
116
99
117
> [ !TIP]
100
118
> Your subscription is remembered for future sessions using ` /home/<user>/.azure/azureProfile.json ` .
101
119
102
- ### Create a resource group
103
-
104
- Create a new resource group in CentralUS named ` MyRG ` .
105
-
106
- ### [ Azure CLI] ( #tab/azurecli )
107
-
108
- ``` azurecli-interactive
109
- az group create --location centralus --name MyRG
110
- ```
111
-
112
- ### [ Azure PowerShell] ( #tab/powershell )
113
-
114
- ``` azurepowershell-interactive
115
- New-AzResourceGroup -Name MyRG -Location centralus
116
- ```
117
-
118
- ---
119
-
120
120
### Get a list of Azure commands
121
121
122
- ### [ Azure CLI] ( #tab/azurecli )
122
+ <!-- markdownlint-disable MD023 -->
123
+ <!-- markdownlint-disable MD024-->
124
+ <!-- markdownlint-disable MD051 -->
125
+ #### [ Azure CLI] ( #tab/azurecli )
123
126
124
127
Run the following command to see a list of all Azure CLI commands.
125
128
@@ -133,7 +136,7 @@ Run the following command to get a list of Azure CLI commands that apply to WebA
133
136
az webapp --help
134
137
```
135
138
136
- ### [ Azure PowerShell] ( #tab/powershell )
139
+ #### [ Azure PowerShell] ( #tab/powershell )
137
140
138
141
Run the following command to see a list of all Azure PowerShell cmdlets.
139
142
@@ -149,6 +152,9 @@ Run the following commands to get a list the Azure PowerShell commands that appl
149
152
cd 'Azure:/My Subscription/WebApps'
150
153
Get-AzCommand
151
154
```
155
+ <!-- markdownlint-enable MD023 -->
156
+ <!-- markdownlint-enable MD024 -->
157
+ <!-- markdownlint-enable MD051 -->
152
158
153
159
---
154
160
0 commit comments