共用方式為


Get-AzCloudService

顯示雲端服務的相關信息。

語法

Get-AzCloudService
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzCloudService
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzCloudService
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzCloudService
   -InputObject <ICloudServiceIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

顯示雲端服務的相關信息。

範例

範例 1:取得資源群組下的所有雲端服務

Get-AzCloudService -ResourceGroupName "ContosOrg"

ResourceGroupName Name              Location    ProvisioningState
----------------- ----              --------    -----------------
ContosOrg         ContosoCS         eastus2euap Succeeded
ContosOrg         ContosoCSTest     eastus2euap Failed

此命令會取得資源群組中名為 ContosOrg 的所有雲端服務

範例 2:取得雲端服務

$cloudService = Get-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS"
$cloudService | Format-List

ResourceGroupName : ContosOrg
Configuration     : xxxxxxxx
ConfigurationUrl  :
ExtensionProfile  : xxxxxxxx
Id                : xxxxxxxx
Location          : East US
Name              : ContosoCS
NetworkProfile    : xxxxxxxx
OSProfile         : xxxxxxxx
PackageUrl        : xxxxxxxx
ProvisioningState : Succeeded
RoleProfile       : xxxxxxxx
StartCloudService :
Tag               : {
                      "Owner": "Contos"
                    }
Type              : Microsoft.Compute/cloudServices
UniqueId          : xxxxxxxx
UpgradeMode       : Auto

此命令會取得名為 ContosoCS 的雲端服務,此服務屬於名為 ContosOrg 的資源群組。

參數

-DefaultProfile

DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。

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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

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

-Name

雲端服務的名稱。

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

-ResourceGroupName

資源群組的名稱。

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

-SubscriptionId

可唯一識別Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶標識碼會形成每個服務呼叫 URI 的一部分。

類型:String[]
Position:Named
預設值:(Get-AzContext).Subscription.Id
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

ICloudServiceIdentity

輸出

ICloudService