你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzCloudServiceOSVersion
获取可在云服务的 XML 服务配置(.cscfg)中指定的来宾操作系统版本的属性。
语法
Get-AzCloudServiceOSVersion
-Location <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzCloudServiceOSVersion
-Location <String>
-OSVersionName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzCloudServiceOSVersion
-InputObject <ICloudServiceIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
说明
获取可在云服务的 XML 服务配置(.cscfg)中指定的来宾操作系统版本的属性。
示例
示例 1:获取位置中的所有 OS 版本
Get-AzCloudServiceOSVersion -location 'westus2'
Name Label IsDefault IsActive Family FamilyLabel
---- ----- --------- -------- ------ -----------
WA-GUEST-OS-6.7_201905-01 Windows Azure Guest OS 6.7 (Release 201905-01) False False 6 Windows Server 2019
WA-GUEST-OS-3.21_201411-01 Windows Azure Guest OS 3.21 (Release 201411-01) False False 3 Windows Server 2012
WA-GUEST-OS-3.34_201512-01 Windows Azure Guest OS 3.34 (Release 201512-01) False False 3 Windows Server 2012
WA-GUEST-OS-3.26_201504-01 Windows Azure Guest OS 3.26 (Release 201504-01) False False 3 Windows Server 2012
WA-GUEST-OS-2.46_201512-01 Windows Azure Guest OS 2.46 (Release 201512-01) False False 2 Windows Server 2008 R2
此命令获取 location westus2 中的所有 OS 版本
示例 2:获取 OS 版本
Get-AzCloudServiceOSVersion -location 'westus2' -OSVersionName 'WA-GUEST-OS-6.7_201905-01'
Name Label IsDefault IsActive Family FamilyLabel
---- ----- --------- -------- ------ -----------
WA-GUEST-OS-6.7_201905-01 Windows Azure Guest OS 6.7 (Release 201905-01) False False 6 Windows Server 2019
此命令获取位于 westus2 中的名为 WA-GUEST-OS-6.7_201905-01 的 OS 版本。
参数
-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 |
-Location
OS 版本所涉及的位置的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OSVersionName
OS 版本的名称。
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 |
输入
输出
备注
别名
复杂参数属性
若要创建下面所述的参数,请构造一个包含相应属性的哈希表。 有关哈希表的信息,请运行 Get-Help about_Hash_Tables。
INPUTOBJECT <ICloudServiceIdentity>
:标识参数
[CloudServiceName <String>]
:云服务的名称。[IPConfigurationName <String>]
:IP 配置名称。[Id <String>]
:资源标识路径[Location <String>]
:OS 版本所涉及的位置的名称。[NetworkInterfaceName <String>]
:网络接口的名称。[OSFamilyName <String>]
:OS 系列的名称。[OSVersionName <String>]
:OS 版本的名称。[PublicIPAddressName <String>]
:公共 IP 地址的名称。[ResourceGroupName <String>]
:资源组的名称。[RoleInstanceName <String>]
:角色实例的名称。[RoleName <String>]
:角色的名称。[SubscriptionId <String>]
:唯一标识 Microsoft Azure 订阅的订阅凭据。 此订阅 ID 是每个服务调用的 URI 的一部分。[UpdateDomain <Int32?>]
:指定标识更新域的整数值。 更新域使用从零开始的索引进行标识:第一个更新域的 ID 为 0,第二个更新域的 ID 为 1,依如此。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈