external help file | Module Name | online version | schema | content_git_url | original_content_git_url |
---|---|---|---|---|---|
Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml |
Az.Accounts |
2.0.0 |
Get the defaults set by the user in the current context.
Get-AzDefault [-ResourceGroup] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
The Get-AzDefault cmdlet gets the Resource Group that the user has set as default in the current context.
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.
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.
The credentials, account, tenant, and subscription used for communication with azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Display Default Resource Group
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.