共用方式為


Remove-WAPackCloudService

拿掉雲端服務物件。

注意

本文件中參考的 Cmdlet 用於管理使用 Azure Service Manager(ASM) API 的舊版 Azure 資源。 建立新的資源時,不建議使用此舊版 PowerShell 模組,因為 ASM 已排定淘汰。 如需詳細資訊,請參閱 Azure Service Manager 淘汰

Az PowerShell 模組是使用 PowerShell 管理 Azure Resource Manager (ARM) 資源的建議 PowerShell 模組。

語法

Remove-WAPackCloudService
      -CloudService <CloudService>
      [-PassThru]
      [-Force]
      [-Profile <AzureSMProfile>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

這些主題已被取代,未來將會移除。 本主題描述 Microsoft Azure PowerShell 模組 0.8.1 版中的 Cmdlet。 若要瞭解您所使用的模組版本,請從 Azure PowerShell 控制台輸入 (Get-Module -Name Azure).Version

Remove-WAPackCloudService Cmdlet 會移除雲端服務物件。

範例

範例 1:移除雲端服務

PS C:\> $CloudService = Get-WAPackCloudService -Name "ContosoCloudService01"
PS C:\> Remove-WAPackVM -VM $CloudService

第一個命令會使用 Get-WAPackCloudService Cmdlet 取得名為 ContosoCloudService01 的雲端服務,然後將該物件儲存在 $CloudService 變數中。

第二個命令會移除儲存在 $CloudService 中的 cloudservice。 命令會提示您進行確認。

範例 2:移除雲端服務而不需確認

PS C:\> $CloudService = Get-WAPackCloudService -Name "ContosoCloudService02"
PS C:\> Remove-WAPackCloudService -VM $CloudService -Force

第一個命令會使用 Get-WAPackCloudService Cmdlet 取得名為 ContosoCloudService02 的雲端服務,然後將該物件儲存在 $CloudService 變數中。

第二個命令會移除儲存在 $CloudService 中的雲端服務。 此命令包含 Force 參數。 命令不會提示您進行確認。

參數

-CloudService

指定雲端服務物件。 若要取得雲端服務,請使用 Get-WAPackCloudService Cmdlet。

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

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-Force

強制命令執行,而不要求使用者確認。

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

-PassThru

會傳回 物件,代表您正在使用的專案。 根據預設,此 Cmdlet 不會產生任何輸出。

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

-Profile

指定此 Cmdlet 從中讀取的 Azure 設定檔。 如果您未指定設定檔,此 Cmdlet 會從本機預設配置檔讀取。

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

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False