Get-AzDefault
Get the defaults set by the user in the current context.
Syntax
Get-AzDefault
[-ResourceGroup]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzDefault cmdlet gets the Resource Group that the user has set as default in the current context.
Examples
Example 1
Get-AzDefault
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup
Name : myResourceGroup
Properties : Microsoft.Azure.Management.Internal.Resources.Models.ResourceGroupProperties
Location : eastus
ManagedBy :
Tags :
This command returns the current defaults if there are defaults set, or returns nothing if no default is set.
Example 2
Get-AzDefault -ResourceGroup
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup
Name : myResourceGroup
Properties : Microsoft.Azure.Management.Internal.Resources.Models.ResourceGroupProperties
Location : eastus
ManagedBy :
Tags :
This command returns the current default Resource Group if there is a default set, or returns nothing if no default is set.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroup
Display Default Resource Group
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Outputs
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure PowerShell