你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
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>]
说明
显示有关云服务的信息。
示例
示例 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
此命令获取属于名为 ContosOrg 的资源组的名为 ContosoCS 的云服务。
参数
-DefaultProfile
DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
要构造的标识参数,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。
Type: | ICloudServiceIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
云服务的名称。
Type: | String |
Aliases: | CloudServiceName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
资源组的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
唯一标识 Microsoft Azure 订阅的订阅凭据。 此订阅 ID 是每个服务调用的 URI 的一部分。
Type: | String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |