共用方式為


Get-AzAutomationAccount

取得資源群組中的自動化帳戶。

語法

ByAll (預設值)

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

ByAutomationAccountName

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

Description

Get-AzAutomationAccount Cmdlet 會取得資源群組中的 Azure 自動化帳戶。 如需自動化帳戶的詳細資訊,請參閱 New-AzAutomationAccount Cmdlet。

範例

範例 1:取得所有帳戶

Get-AzAutomationAccount -ResourceGroupName "ResourceGroup03"

此命令會取得名為 ResourceGroup03 的資源群組中的所有自動化帳戶。

範例 2:取得帳戶

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

此命令會在名為 ContosoResourceGroup 的資源群組中取得名為 ContosoAutomationAccount 的自動化帳戶。

參數

-DefaultProfile

用來與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶

參數屬性

類型:IAzureContextContainer
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzContext, AzureRmContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Name

指定此 Cmdlet 取得的自動化帳戶名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:自動化帳戶名稱

參數集

ByAutomationAccountName
Position:1
必要:True
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

-ResourceGroupName

指定此 Cmdlet 取得 Automation 帳戶的資源群組名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

ByAll
Position:0
必要:False
來自管線的值:False
來自管線按屬性名稱的值:True
來自剩餘引數的值:False

CommonParameters

此 cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

String

輸出

AutomationAccount