Skip to content

Commit 4c57462

Browse files
Merge pull request #229111 from theJasonHelmick/register-namespace
Adding register namespace to Bash/PowerShell
2 parents f42895e + 24450b0 commit 4c57462

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

articles/cloud-shell/quickstart-powershell.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ For a detailed list of differences, see [PowerShell differences on non-Windows p
3737

3838
![Screenshot showing how to select the PowerShell environment for the Azure Cloud Shell.][08]
3939

40+
## Registering your subscription with Azure Cloud Shell
41+
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:
45+
46+
```azurepowershell-interactive
47+
Select-AzSubscription -SubscriptionId <SubscriptionId>
48+
Register-AzResourceProvider -ProviderNamespace Microsoft.CloudShell
49+
```
50+
51+
> [!NOTE]
52+
> You only need to register the namespace once per subscription. You will not be able to manage
53+
> resources using Azure Cloud Shell without registering the namespace.
54+
4055
## Run PowerShell commands
4156

4257
Run regular PowerShell commands in the Cloud Shell, such as:

articles/cloud-shell/quickstart.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,20 @@ This document details how to use Bash in Azure Cloud Shell in the [Azure portal]
3131
> [!TIP]
3232
> You are automatically authenticated for Azure CLI in every session.
3333
34-
### Select the Bash environment
34+
### Registering your subscription with Azure Cloud Shell
3535

36-
Check that the environment drop-down from the left-hand side of shell window says `Bash`.
36+
Azure Cloud Shell needs access to manage resources. Access is provided through namespaces that must
37+
be registered to your subscription. Use the following commands to register the Microsoft.CloudShell
38+
RP namespace in your subscription:
3739

38-
![Screenshot showing how to select the Bash environment for the Azure Cloud Shell.][04]
40+
```azurecli-interactive
41+
az account set --subscription <Subscription Name or Id>
42+
az provider register --namespace Microsoft.CloudShell
43+
```
44+
45+
> [!NOTE]
46+
> You only need to register the namespace once per subscription. You will not be able to manage
47+
> resources using Azure Cloud Shell without registering the namespace.
3948
4049
### Set your subscription
4150

0 commit comments

Comments
 (0)