New-PartnerCustomerOrder

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

Syntax

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

Description

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

Examples

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 '10704f2f-3fc6-4e42-8acf-08df4f81c93c'
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.

Parameters

-BillingCycle

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

Type:BillingCycleType
Accepted values:Annual, Monthly, None
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CustomerId

The identifier of the customer making the purchase.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-LineItems

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

Type:PSOrderLineItem[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-OrderId

The order identifier used when purchasing an add-on.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

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