Get-AzAutomationVariable

Mendapatkan variabel Automation.

Sintaks

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

Deskripsi

Cmdlet Get-AzAutomationVariable mendapatkan satu atau beberapa variabel Azure Automation. Untuk mendapatkan variabel tertentu, tentukan namanya.

Contoh

Contoh 1: Mendapatkan variabel

$Variable = Get-AzAutomationVariable -AutomationAccountName "Contoso17" -Name "Variable06" -ResourceGroupName "ResourceGroup01"
$Value = $Variable.value

Perintah pertama mendapatkan variabel Automation bernama Variable06 di akun bernama Contoso17. Perintah menyimpan objek tersebut dalam variabel $Variable. Perintah kedua menggunakan notasi titik standar untuk merujuk ke properti nilai $Variable. Perintah menyimpan nilai dalam variabel $value.

Parameter

-AutomationAccountName

Menentukan nama akun Automation yang berisi variabel yang didapat cmdlet ini.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Menentukan nama variabel yang didapat cmdlet ini.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

Menentukan grup sumber daya tempat cmdlet ini mendapatkan variabel.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Input

String

Output

Variable