Skip to content

Commit 8c8a0ae

Browse files
authored
Fix returned fields in Get-AzureRmSubscription
Fixed the examples of returned fields in Get-AzureRmSubscription. Added an extra piped statement to Example 4 because it would not naturally work with the newly renamed fields.
1 parent afe4928 commit 8c8a0ae

File tree

1 file changed

+27
-19
lines changed

1 file changed

+27
-19
lines changed

src/ResourceManager/Profile/Commands.Profile/help/Get-AzureRmSubscription.md

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ access.
3535
```
3636
PS C:\>Get-AzureRmSubscription
3737
38-
Subscription Name : Contoso Subscription 1
39-
SubscriptionId : xxxx-xxxx-xxxx-xxxx
40-
TenantId : yyyy-yyyy-yyyy-yyyy
38+
Name : Contoso Subscription 1
39+
Id : xxxx-xxxx-xxxx-xxxx
40+
TenantId : yyyy-yyyy-yyyy-yyyy
41+
State : Enabled
4142
```
4243

4344
This command gets all subscriptions in all tenants that are authorized for
@@ -47,13 +48,15 @@ the current account.
4748
```
4849
PS C:\>Get-AzureRmSubscription -TenantId "xxxx-xxxx-xxxx-xxxx"
4950
50-
Subscription Name : Contoso Subscription 1
51-
SubscriptionId : yyyy-yyyy-yyyy-yyyy
52-
TenantId : xxxx-xxxx-xxxx-xxxx
51+
Name : Contoso Subscription 1
52+
Id : yyyy-yyyy-yyyy-yyyy
53+
TenantId : xxxx-xxxx-xxxx-xxxx
54+
State : Enabled
5355
54-
Subscription Name : Contoso Subscription 2
55-
SubscriptionId : yyyy-yyyy-yyyy-yyyy
56-
TenantId : xxxx-xxxx-xxxx-xxxx
56+
Name : Contoso Subscription 2
57+
Id : yyyy-yyyy-yyyy-yyyy
58+
TenantId : xxxx-xxxx-xxxx-xxxx
59+
State : Enabled
5760
```
5861

5962
List all subscriptions in the given tenant that are authorized for the
@@ -63,25 +66,30 @@ current account.
6366
```
6467
PS C:\>Get-AzureRmSubscription
6568
66-
Subscription Name : Contoso Subscription 1
67-
SubscriptionId : yyyy-yyyy-yyyy-yyyy
68-
TenantId : xxxx-xxxx-xxxx-xxxx
69+
Name : Contoso Subscription 1
70+
Id : yyyy-yyyy-yyyy-yyyy
71+
TenantId : xxxx-xxxx-xxxx-xxxx
72+
State : Enabled
6973
70-
Subscription Name : Contoso Subscription 2
71-
SubscriptionId : yyyy-yyyy-yyyy-yyyy
72-
TenantId : xxxx-xxxx-xxxx-xxxx
74+
Name : Contoso Subscription 2
75+
Id : yyyy-yyyy-yyyy-yyyy
76+
TenantId : xxxx-xxxx-xxxx-xxxx
77+
State : Enabled
7378
```
7479

7580
This command gets all subscriptions in the current tenant that are
7681
authorized for the current user.
7782

7883
### Example 4: Change the current context to use a specific subscription
7984
```
80-
PS C:\>Get-AzureRmSubscription -SubscriptionId "xxxx-xxxx-xxxx-xxxx" -TenantId "yyyy-yyyy-yyyy-yyyy" | Set-AzureRmContext
85+
PS C:\>Get-AzureRmSubscription -SubscriptionId "xxxx-xxxx-xxxx-xxxx" -TenantId "yyyy-yyyy-yyyy-yyyy" | Select @{n='SubscriptionId';e={$_.Id}} | Set-AzureRmContext
8186
82-
Subscription Name : Contoso Subscription 1
83-
SubscriptionId : xxxx-xxxx-xxxx-xxxx
84-
TenantId : yyyy-yyyy-yyyy-yyyy
87+
Environment : AzureCloud
88+
89+
TenantId : yyyy-yyyy-yyyy-yyyy
90+
SubscriptionId : xxxx-xxxx-xxxx-xxxx
91+
SubscriptionName : Contoso Subscription 1
92+
CurrentStorageAccount :
8593
```
8694

8795
This command gets the specified subscription, and then sets the current

0 commit comments

Comments
 (0)