你当前正在访问 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 参数。
类型: | PSObject |
别名: | AzureRMContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
要构造的标识参数,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。
类型: | ICloudServiceIdentity |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Location
OS 版本所涉及的位置的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-OSVersionName
OS 版本的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
唯一标识 azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。
类型: | String[] |
Position: | Named |
默认值: | (Get-AzContext).Subscription.Id |
必需: | False |
接受管道输入: | False |
接受通配符: | False |