共用方式為


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>]

Description

取得客體作系統版本的屬性,該版本可以在雲端服務的 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

此命令會取得名為 WA-GUEST-OS-6.7_201905-01 的 OS 版本,該版本位於 westus2。

參數

-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

-Location

作系統版本所屬位置的名稱。

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

-OSVersionName

作系統版本的名稱。

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

-SubscriptionId

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

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

輸入

輸出