Edit

Share via


Get-AzAutomationAccount

Gets Automation accounts in a resource group.

Syntax

ByAll (Default)

Get-AzAutomationAccount
    [[-ResourceGroupName] <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByAutomationAccountName

Get-AzAutomationAccount
    [-ResourceGroupName] <String>
    [-Name] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzAutomationAccount cmdlet gets Azure Automation accounts in a resource group. For more information about Automation accounts, see the New-AzAutomationAccount cmdlet.

Examples

Example 1: Get all accounts

Get-AzAutomationAccount -ResourceGroupName "ResourceGroup03"

This command gets all Automation accounts in the resource group named ResourceGroup03.

Example 2: Get an account

Get-AzAutomationAccount -ResourceGroupName "ResourceGroup03" -Name "ContosoAutomationAccount"

This command gets the Automation account named ContosoAutomationAccount in the resource group named ContosoResourceGroup.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the Automation account that this cmdlet gets.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AutomationAccountName

Parameter sets

ByAutomationAccountName
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceGroupName

Specifies the name of a resource group in which this cmdlet gets Automation accounts.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByAll
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

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

Inputs

String

Outputs

AutomationAccount