共用方式為


New-AzConnectedLicenseProfile

建立授權配置檔的作業。

語法

New-AzConnectedLicenseProfile
   -MachineName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -Location <String>
   [-EsuProfileAssignedLicense <String>]
   [-ProductProfileProductFeature <IProductFeature[]>]
   [-ProductProfileProductType <String>]
   [-ProductProfileSubscriptionStatus <String>]
   [-SoftwareAssuranceCustomer]
   [-Tag <Hashtable>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicenseProfile
   -MachineName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -JsonString <String>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicenseProfile
   -MachineName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -JsonFilePath <String>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicenseProfile
   -MachineName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -Parameter <ILicenseProfile>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicenseProfile
   -InputObject <IConnectedMachineIdentity>
   -Location <String>
   [-EsuProfileAssignedLicense <String>]
   [-ProductProfileProductFeature <IProductFeature[]>]
   [-ProductProfileProductType <String>]
   [-ProductProfileSubscriptionStatus <String>]
   [-SoftwareAssuranceCustomer]
   [-Tag <Hashtable>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzConnectedLicenseProfile
   -InputObject <IConnectedMachineIdentity>
   -Parameter <ILicenseProfile>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

建立授權配置檔的作業。

範例

範例 1:建立計算機的授權配置檔

$productfeature = New-AzConnectedLicenseProfileFeature -Name "Hotpatch" -SubscriptionStatus "Enable"

New-AzConnectedLicenseProfile -MachineName "WIN-IAH3TLSP7A8" -ResourceGroupName "PayGo_cmdlet" -Location "eastus" -ProductProfileProductType "WindowsServer" -ProductProfileSubscriptionStatus "Enabled" -ProductProfileProductFeature $productfeature

AdditionalInfo                       :
Code                                 :
Detail                               :
EsuProfileAssignedLicense            :
EsuProfileAssignedLicenseImmutableId :
EsuProfileEsuEligibility             : Ineligible
EsuProfileEsuKey                     : {}
EsuProfileEsuKeyState                : Inactive
EsuProfileServerType                 : Datacenter
Id                                   : /subscriptions/********-****-****-****-**********/resourceGroups/PayGo_c
                                       mdlet/providers/Microsoft.HybridCompute/machines/WIN-IAH3TLSP7A8/licensePr
                                       ofiles/default
Location                             : eastus
Message                              :
Name                                 : default
ProductProfileBillingEndDate         :
ProductProfileBillingStartDate       : 11/15/2024 1:53:34 AM
ProductProfileDisenrollmentDate      :
ProductProfileEnrollmentDate         : 11/8/2024 1:53:34 AM
ProductProfileProductFeature         : {{
                                         "name": "WindowsServerAzureArcMgmt",
                                         "subscriptionStatus": "Enabled",
                                         "enrollmentDate": "2024-11-08T01:58:37.6099656Z",
                                         "billingStartDate": "2024-11-08T01:58:37.6096833Z"
                                       }, {
                                         "name": "Hotpatch",
                                         "subscriptionStatus": "Enabled",
                                         "enrollmentDate": "2024-11-08T01:58:37.6095044Z",
                                         "billingStartDate": "2025-02-01T00:00:00.0000000"
                                       }}
ProductProfileProductType            : WindowsServer
ProductProfileSubscriptionStatus     : Enabled
ProvisioningState                    : Succeeded
ResourceGroupName                    : PayGo_cmdlet
SoftwareAssuranceCustomer            :
SystemDataCreatedAt                  :
SystemDataCreatedBy                  :
SystemDataCreatedByType              :
SystemDataLastModifiedAt             :
SystemDataLastModifiedBy             :
SystemDataLastModifiedByType         :
Tags                                 : {
                                       }
Target                               :
Type                                 : Microsoft.HybridCompute/machines/licenseProfiles

建立計算機的授權配置檔

參數

-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

-EsuProfileAssignedLicense

授權的資源標識碼。

類型:String
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

-Location

資源所在的地理位置

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

-MachineName

混合式計算機的名稱。

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

-NoWait

以異步方式執行命令

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

-Parameter

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

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

-ProductProfileProductFeature

產品功能清單。

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

-ProductProfileProductType

表示授權的產品類型。

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

-ProductProfileSubscriptionStatus

指出產品的訂閱狀態。

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

-ResourceGroupName

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

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

-SoftwareAssuranceCustomer

指定此電腦是否獲授權作為軟體保證合約的一部分。

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

-SubscriptionId

目標訂用帳戶的標識碼。

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

-Tag

資源標籤。

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

-WhatIf

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

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

輸入

輸出