共用方式為


Get-AzAutomationDscNodeConfigurationDeployment

取得自動化中的 DSC 節點組態部署。

語法

Get-AzAutomationDscNodeConfigurationDeployment
   [-Status <String>]
   [-StartTime <DateTimeOffset>]
   [-EndTime <DateTimeOffset>]
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAutomationDscNodeConfigurationDeployment
   -JobId <Guid>
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Get-AzAutomationDscNodeConfigurationDeployment Cmdlet 會在 Azure 自動化中部署 APS 預期狀態設定 (DSC) 節點組態。

範例

範例 1:取得節點組態部署

$deployment = Get-AzAutomationDscNodeConfigurationDeployment `
                         -JobId 35b14eb4-52b7-4a1d-ad62-8e9f84adc657 `
                         -AutomationAccountName "Contoso01" `
                         -ResourceGroupName "ResourceGroup01"

ResourceGroupName     : ResourceGroup01
AutomationAccountName : Contoso01
JobId                 : 35b14eb4-52b7-4a1d-ad62-8e9f84adc657
Job                   : Microsoft.Azure.Commands.Automation.Model.Job
JobStatus             : Running
NodeStatus            : {System.Collections.Generic.Dictionary`2[System.String,System.String], System.Collections.Generic.Dictionary`2[System.String,System.String]}
NodeConfigurationName : Config01.Node1
JobSchedule           :
JobScheduleId         : 00000000-0000-0000-0000-000000000000

$deployment | Select-Object -ExpandProperty nodeStatus

Key        Value
---        -----
WebServer  Pending
WebServer2 Pending
WebServer3 Compliant

上述命令會將名為 「Config01.Node1」 的 DSC 節點組態部署到節點名稱的指定二維陣列。 部署會以分段方式進行。

參數

-AutomationAccountName

指定自動化帳戶的名稱,其中包含此 Cmdlet 所編譯的 DSC 組態。

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-EndTime

結束時間篩選。

類型:Nullable<T>[DateTimeOffset]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-JobId

指定現有部署作業的作業識別碼。

類型:Guid
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceGroupName

指定此 Cmdlet 編譯組態的資源群組名稱。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-StartTime

開始時間篩選。

類型:Nullable<T>[DateTimeOffset]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Status

作業篩選的狀態。

類型:String
接受的值:Completed, Failed, Queued, Starting, Resuming, Running, Stopped, Stopping, Suspended, Suspending, Activating
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出