共用方式為


Get-AzureRmDeploymentOperation

取得部署作業

警告

自 2024 年 2 月 29 日起,AzureRM PowerShell 模組已正式淘汰。 建議使用者從 AzureRM 遷移至 Az PowerShell 模組,以確保持續支援和更新。

雖然 AzureRM 模組可能仍可運作,但不再維護或支援它,但會根據用戶的判斷權和風險放置任何繼續使用。 如需轉換至 Az 模組的指引,請參閱我們的 移轉資源

Syntax

Get-AzureRmDeploymentOperation
   -DeploymentName <String>
   [-OperationId <String>]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmDeploymentOperation
   -DeploymentObject <PSDeployment>
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Get-AzureRmDeploymentOperation Cmdlet 會列出屬於部署一部分的所有作業,以協助您識別並提供有關特定部署失敗之確切作業的詳細資訊。 它也可以顯示每個部署作業的回應和要求內容。 這是入口網站上部署詳細數據中所提供的相同資訊。

若要取得要求和響應內容,請在透過 New-AzureRmDeployment 提交部署時啟用設定。 它可能會記錄並公開秘密,例如資源屬性或 listKeys 作業中使用的密碼,然後在擷取部署作業時傳回。 如需此設定以及如何啟用的詳細資訊,請參閱New-AzureRmDeployment和偵錯ARM範本部署

範例

取得指定部署名稱的部署作業

PS C:\>Get-AzureRmDeploymentOperation -DeploymentName test

取得目前訂用帳戶範圍名稱為 「test」 的部署作業。

取得部署並取得其部署作業

PS C:\>Get-AzureRmDeployment -Name "test" | Get-AzureRmDeploymentOperation

此命令會取得目前訂用帳戶範圍的部署「測試」,並取得其部署作業。

參數

-ApiVersion

設定時,表示要使用的資源提供者 API 版本。 如果未指定,API 版本會自動判斷為最新的可用版本。

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

-DefaultProfile

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

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

-DeploymentName

部署名稱。

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

-DeploymentObject

部署物件。

Type:PSDeployment
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-OperationId

部署作業標識碼。

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

-Pre

設定時,表示 Cmdlet 在自動判斷要使用的版本時,應該使用發行前版本 API 版本。

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

輸入

String

System.Nullable'1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

輸出

PSDeploymentOperation