Skip to content

Commit d25128e

Browse files
michawetsSyntaxC4
authored andcommitted
Change the default subscription using AZ cmdlets
Select-AzureSubscription is using a different Module than the default AZ Module, which could cause confusion and issues for users. Select-AzSubscription is integrated in the AZ Modules
1 parent 993c21f commit d25128e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

articles/virtual-desktop/powershell-module.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ This will sign you directly into the subscription that is default for your admin
5858
If you want to change the default subscription after you've signed in, run this cmdlet:
5959

6060
```powershell
61-
Select-AzSubscription -SubscriptionName <preferredsubscriptionname>
61+
Select-AzSubscription -Subscription <preferredsubscriptionname>
62+
```
63+
64+
You can also select on from a list using the Out-GridView cmdlet:
65+
```powershell
66+
Get-AzSubscription | Out-GridView -PassThru | Select-AzSubscription
6267
```
6368

6469
When you select a new subscription to use, you don't need to specify that subscription's ID in cmdlets you run afterwards. For example, the following cmdlet retrieves a specific session host without needing the subscription ID:

0 commit comments

Comments
 (0)