Skip to content

Latest commit

 

History

History
104 lines (78 loc) · 2.81 KB

Get-AzDefault.md

File metadata and controls

104 lines (78 loc) · 2.81 KB
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-AzDefault

SYNOPSIS

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: 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

-ResourceGroup

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Management.Automation.SwitchParameter

OUTPUTS

Microsoft.Azure.Commands.Profile.Models.PSResourceGroup

NOTES

RELATED LINKS