次の方法で共有


New-PartnerCustomerOrder

Create a new order for the specified services on behalf of the customer.

構文

Subscription (既定)

New-PartnerCustomerOrder
    -CustomerId <String>
    -LineItems <PSOrderLineItem[]>
    [-BillingCycle <BillingCycleType>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

AddOn

New-PartnerCustomerOrder
    -CustomerId <String>
    -LineItems <PSOrderLineItem[]>
    -OrderId <String>
    [-BillingCycle <BillingCycleType>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

説明

Create a new order for the specified services on behalf of the customer.

Example 1

PS C:\> $lineItem = New-Object -TypeName Microsoft.Store.PartnerCenter.PowerShell.Models.Orders.PSOrderLineItem
PS C:\>
PS C:\> $lineItem.LineItemNumber = 0
PS C:\> $lineItem.OfferId = '031C9E47-4802-4248-838E-778FB1D2CC05'
PS C:\> $lineItem.Quantity = 1
PS C:\>
PS C:\> New-PartnerCustomerOrder -BillingCycle Monthly -CustomerId '46a62ece-10ad-42e5-b3f1-b2ed53e6fc08' -LineItems @($lineItem)

Creates a new order for the specified services on behalf of the customer.

Example 2

PS C:\> $s = Get-PartnerCustomerSubscription -CustomerId '46a62ece-10ad-42e5-b3f1-b2ed53e6fc08' -SubscriptionId 'aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
PS C:\> $addOn = Get-PartnerOfferAddon -OfferId $s.OfferId | Where-Object {$_.Name -eq 'Microsoft MyAnalytics'}
PS C:\>
PS C:\> $lineItem = New-Object -TypeName Microsoft.Store.PartnerCenter.PowerShell.Models.Orders.PSOrderLineItem
PS C:\>
PS C:\> $lineItem.LineItemNumber = 0
PS C:\> $lineItem.OfferId = $addOn.OfferId
PS C:\> $lineItem.Quantity = 1
PS C:\> $lineItem.FriendlyName = $addOn.Name
PS C:\> $lineItem.ParentSubscriptionId = $s.SubscriptionId
PS C:\>
PS C:\> New-PartnerCustomerOrder -CustomerId '46a62ece-10ad-42e5-b3f1-b2ed53e6fc08' -LineItems @($lineItem) -OrderId $s.OrderId

Creates an order to purchase an add-on for the specific subscription on behalf of the customer. This example shows how to purchase the Microsoft MyAnalytics add-on for the specified subscription. In this case the specified subscription is an Office 365 E3 subscription.

パラメーター

-BillingCycle

The frequency with which the partner is billed for this order.

パラメーターのプロパティ

型:BillingCycleType
規定値:None
指定可能な値:Annual, Monthly, None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-Confirm

Prompts you for confirmation before running the cmdlet.

パラメーターのプロパティ

型:SwitchParameter
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:cf

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-CustomerId

The identifier of the customer making the purchase.

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-LineItems

The order line items. Each order line item refers to one offer's purchase data.

パラメーターのプロパティ

型:

PSOrderLineItem[]

規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-OrderId

The order identifier used when purchasing an add-on.

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

AddOn
配置:Named
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

パラメーターのプロパティ

型:SwitchParameter
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:wi

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

入力

None

出力

Microsoft.Store.PartnerCenter.PowerShell.Models.Orders.PSOrder