New-PartnerCustomerOrder

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

Syntax

Subscription (Default)

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

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 '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.

Parameters

-BillingCycle

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

Parameter properties

Type:BillingCycleType
Default value:None
Accepted values:Annual, Monthly, None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomerId

The identifier of the customer making the purchase.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LineItems

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

Parameter properties

Type:

PSOrderLineItem[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OrderId

The order identifier used when purchasing an add-on.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AddOn
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Inputs

None

Outputs

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