共用方式為


New-AzConnectedLicense

建立授權的作業。

語法

New-AzConnectedLicense
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -Location <String>
   [-LicenseDetailEdition <String>]
   [-LicenseDetailProcessor <Int32>]
   [-LicenseDetailState <String>]
   [-LicenseDetailTarget <String>]
   [-LicenseDetailType <String>]
   [-LicenseDetailVolumeLicenseDetail <IVolumeLicenseDetails[]>]
   [-LicenseType <String>]
   [-Tag <Hashtable>]
   [-TenantId <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicense
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -JsonString <String>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicense
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -JsonFilePath <String>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicense
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -Parameter <ILicense>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicense
   -InputObject <IConnectedMachineIdentity>
   -Location <String>
   [-LicenseDetailEdition <String>]
   [-LicenseDetailProcessor <Int32>]
   [-LicenseDetailState <String>]
   [-LicenseDetailTarget <String>]
   [-LicenseDetailType <String>]
   [-LicenseDetailVolumeLicenseDetail <IVolumeLicenseDetails[]>]
   [-LicenseType <String>]
   [-Tag <Hashtable>]
   [-TenantId <String>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicense
   -InputObject <IConnectedMachineIdentity>
   -Parameter <ILicense>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

建立授權的作業。

範例

範例 1:新增 ESU 授權

New-AzConnectedLicense -Name 'myESULicense' -ResourceGroupName 'ytongtest' -Location 'eastus2euap' -LicenseType 'ESU' -LicenseDetailState 'Activated'  -LicenseDetailTarget 'Windows Server 2012' -LicenseDetailEdition 'Datacenter' -LicenseDetailType 'pCore' -LicenseDetailProcessor 16 -SubscriptionId ********-****-****-****-**********

DetailAssignedLicense        : 8
DetailEdition                : Datacenter
DetailImmutableId            : ********-****-****-****-**********
DetailProcessor              : 16
DetailState                  : Activated
DetailTarget                 : Windows Server 2012
DetailType                   : pCore
DetailVolumeLicenseDetail    :
Id                           : /subscriptions/********-****-****-****-**********/resourceGroups/ytongtest/providers/M
                               icrosoft.HybridCompute/licenses/myESULicense
LicenseType                  : ESU
Location                     : eastus2euap
Name                         : myESULicense
ProvisioningState            :
ResourceGroupName            : ytongtest
SystemDataCreatedAt          :
SystemDataCreatedBy          :
SystemDataCreatedByType      :
SystemDataLastModifiedAt     :
SystemDataLastModifiedBy     :
SystemDataLastModifiedByType :
Tag                          : {
                               }
TenantId                     : ********-****-****-****-**********
Type                         : Microsoft.HybridCompute/licenses

新增 ESU 授權

參數

-AsJob

以作業身分執行命令

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

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

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

-DefaultProfile

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

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

-InputObject

Identity 參數

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

-JsonFilePath

提供給建立作業的 Json 檔案路徑

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

-JsonString

提供給建立作業的 Json 字串

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

-LicenseDetailEdition

描述授權的版本。 這些值為 Standard 或 Datacenter。

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

-LicenseDetailProcessor

描述處理器數目。

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

-LicenseDetailState

描述授權的狀態。

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

-LicenseDetailTarget

描述授權目標伺服器。

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

-LicenseDetailType

描述授權核心類型(pCore 或虛擬核心)。

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

-LicenseDetailVolumeLicenseDetail

大量授權詳細數據的清單。

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

-LicenseType

授權資源的型別。

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

-Location

資源所在的地理位置

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

-Name

授權的名稱。

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

-NoWait

以異步方式執行命令

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

-Parameter

描述混合式機器中的授權。

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

-ResourceGroupName

資源群組的名稱。 名稱不區分大小寫。

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

-SubscriptionId

目標訂用帳戶的標識碼。

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

-Tag

資源標籤。

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

-TenantId

描述租用戶標識碼。

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

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

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

輸入

輸出